WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 12234
64860
Script element created with Range.createContextualFragment is not executed
https://bugs.webkit.org/show_bug.cgi?id=64860
Summary
Script element created with Range.createContextualFragment is not executed
Martin Grigorov
Reported
2011-07-20 04:09:49 PDT
Chrome Version : 14.0.814.0 dev URLs (if applicable) : See attached Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 5: FAIL Firefox 4.x: OK IE 7/8/9: FAIL Opera 11.x: OK What steps will reproduce the problem? 1. Put the attached .html in a folder under www root. 2. Open it in the browser (e.g.
http://localhost/tmp/execute-script.html
What is the expected result? The 'Old element' DIVElement is replaced with a new ScriptElement and the body of the script element is executed. I.e. an alert with text 'executed' should be shown. What happens instead? The div element is replaced but the the script body is not executed. Please provide any additional information below. Attach a screenshot if possible. This JavaScript snippet is used to replace an element with a new one by creating a fragment from a text and replacing the old element with the fragment. The attachment is simplified - it replaces div with script but in a real application it could be another div with many children one of which is a script. Firefox and Opera support completely this functionality. WebKit based browsers replace the elements but doesn't execute the script body. Internet Explorer doesn't support range.createContextualFragment() at all. Bug report for Chromium:
http://code.google.com/p/chromium/issues/detail?id=89694
Attachments
The demo of the problem.
(680 bytes, text/html)
2011-07-21 00:22 PDT
,
Martin Grigorov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Martin Grigorov
Comment 1
2011-07-21 00:22:31 PDT
Created
attachment 101559
[details]
The demo of the problem. Not sure why the attachment didn't make it when I created this ticket ... Re-attaching it.
Alexey Proskuryakov
Comment 2
2011-08-08 15:31:07 PDT
Are such scripts supposed to be executed per HTML5?
Adam Barth
Comment 3
2011-08-08 15:53:21 PDT
There was a thread on this topic, but I forget what the outcome was.
Henri Sivonen
Comment 4
2011-08-31 05:33:13 PDT
This isn't covered by HTML5. The relevant spec draft is
http://html5.org/specs/dom-parsing.html
and it agrees with the reporter.
Ryosuke Niwa
Comment 5
2012-05-23 18:46:52 PDT
*** This bug has been marked as a duplicate of
bug 12234
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug