Inline scripts are not executed
Reported by fiann | February 10th, 2009 @ 01:38 AM | in 1.0 Release
Scripts that are declared inline in the html page are not executed correctly. This is because the html parser is showing the script body as empty.
To replicate this load any html page with an inline
print("loading inline script :" + script.text);
script.text is empty because the HTML parser appends the text content as a child node of type TEXT_NODE. So we can get the correct content with:
print("loading inline script :" + script.childNodes[0].nodeValue);
Comments and changes to this ticket
-
Thatcher February 16th, 2009 @ 08:25 AM
- Milestone set to 1.0 Release
- Tag set to cdata, childnodes, inline, nodevalue, script, text
- State changed from new to open
- Assigned user set to Thatcher
Nice catch Fiann, I added your patch and will close this ticket when I commit and push.
Thanks!
-
Thatcher February 17th, 2009 @ 04:39 AM
- State changed from open to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
a javascript browser environment
People watching this ticket
Attachments
Referenced by
- 3 Execute scripts appended to DOM by code see also #32
- 3 Execute scripts appended to DOM by code http://envjs.lighthouseapp.com/p...