Scope 'document' locally (also useful for sandboxing). Patch from Andrea Giammarchi. Fixes bug #4905.
Attach a file by drag & drop or click to upload