Opened 9 years ago
Closed 9 years ago
#15014 closed bug (invalid)
document variable got corrupted in jQuery1.11.0 (solution provided)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm injecting jQuery1.11.0 to my ChromeEmbeddedFramework(CEF), using OnContextCreated, and ExecuteJavaScript(code,"jQuery.js",0) and I encountered this bug: Uncaught TypeError: Cannot call method 'createElement' of undefined (at line 917) after further investigation, it appears that function assert(at line 917 of uncompressed jQuery 1.11.0) uses var div = document.createElement("div"); and at this point, document is referring to undefined.
it can easily be fixed: just replace it with var div = window.document.createElement("div");
here is the long version: it's clearly that the bug exists inside jQuery itself: add alert(document) to jQuery line 1 will show that document exists and add alert(document) to jQuery line 917(right before the error) will show that document is undefined! weird though, add alert(window.document) to line 917 will show that window.document exists
so there must be somewhere in the jQuery code(sorry TL;DR) that corrupted the document variable.
Change History (2)
comment:1 Changed 9 years ago by
Owner: | set to Revin <[email protected]…> |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
We'll need a test case showing the problem. We're not going to make changes to the code on hearsay.