Last active
August 29, 2015 14:13
-
-
Save pier-oliviert/ae0320dce453b414309e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var div = document.createElement('div') | |
| div.innerHTML = "<script></script>" | |
| var s = div.children[0] | |
| s.src = "//connect.facebook.net/en_US/all.js#xfbml=1" | |
| // true | |
| s instanceof HTMLScriptElement | |
| // Will NOT load the script | |
| document.head.appendChild(s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var s = document.createElement('script') | |
| s.src = "//connect.facebook.net/en_US/all.js#xfbml=1" | |
| // true | |
| s instanceof HTMLScriptElement | |
| // Will load the script | |
| document.head.appendChild(s) |
Author
Author
Thanks for the follow up David, I'm going to add your findings to the bug report https://code.google.com/p/chromium/issues/detail?id=448783&colspec=ID%20Pri%20M%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified#makechanges
Author
Dah, just found this http://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerhtml0
That's why.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@david-treblig you are right I don't think it's a webkit bug either (tested on FF & safari too and I actually made that distinction when I submitted the bug over to chromium.)
I also think that the node is internally marked differently. I really think this is unintended behavior, but as my bug report are usually dismissed, I wouldn't be surprised if they dismiss it.