diff --git a/src/ecmascript/mujs/document.cpp b/src/ecmascript/mujs/document.cpp index fb7b5af3a..b5995cab4 100644 --- a/src/ecmascript/mujs/document.cpp +++ b/src/ecmascript/mujs/document.cpp @@ -1508,7 +1508,7 @@ mjs_document_init(js_State *J) } js_defglobal(J, "document", JS_DONTENUM); - js_dostring(J, "document.location = location;"); + js_dostring(J, "document.location = location; window.document = document;"); return 0; }