Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Inline scripts are not executed

#32

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);

Reported by fiann · February 10th, 2009 @ 01:38 AM

State: resolved
Milestone: 1.0 Release
Assigned to: Thatcher Thatcher

Activity

  1. Thatcher
    Thatcher
    • 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!

    February 16th, 2009 @ 08:25 AM

  2. Thatcher

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.