This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18422 - Is it deliberate that, in the case of an inline script, beforescriptexecute changing the script text doesn't change what is executed? This doesn't match gecko and seems mildly undesirable from an implementation perspective since you have to keep a seperat
Summary: Is it deliberate that, in the case of an inline script, beforescriptexecute c...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-27 10:49 UTC by contributor
Modified: 2012-10-12 18:26 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2012-07-27 10:49:07 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#establish-script-block-source
Complete: http://www.whatwg.org/c#establish-script-block-source

Comment:
Is it deliberate that, in the case of an inline script, beforescriptexecute
changing the script text doesn't change what is executed? This doesn't match
gecko and seems mildly undesirable from an implementation perspective since
you have to keep a seperate copy of the script text rather than just reading
it from the DOM (it also makes this API work differently to typical extension
APIs where there are strong use cases for modifying script text before
execution. I can't think of a corresponding web use case but having a
difference between the APIs here is not obviously useful).

Posted from: 2001:4c28:a030:30:a1aa:b80d:39b6:aebd
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.10.289 Version/12.01
Comment 1 Ian 'Hixie' Hickson 2012-10-06 17:28:47 UTC
Do you have a test case demonstrating what you describe? I get different results:
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1821

(Gecko here says "cannot change script".)