e6e019b
Rename variable `document` to `doc` This is done because shadowing the global variable `document` can lead to unexpected results.