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 25130
29533
Dynamically loaded scripts
https://bugs.webkit.org/show_bug.cgi?id=29533
Summary
Dynamically loaded scripts
chameleon
Reported
2009-09-20 18:21:07 PDT
I have AJAX loaded XHTML with javascripts: - External, as <script src="..." /> - Internal, as <script>alert(1);</script> - As action on events: <a href="" onclick="alert(5); return false;">whow!</a> On external ( <script src="..." /> ) I must create a <script> element and append on <head> element. This is a workaround needed on Firefox too, but not on Opera. On internal ( <script>alert(1);</script> ) I must run eval(script.text); . This is a workaround needed on Firefox too, but not on Opera. THE REAL PROBLEM: As action on events ( <a href="" onclick="alert(5); return false;">whow!</a> ) doesn't work at all. Work fine on Firefox / Opera.
Attachments
php test file
(1.48 KB, text/plain)
2009-09-22 05:35 PDT
,
chameleon
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2009-09-21 17:45:58 PDT
What browser are you seeing this problem with? If you're running Safari, could you please try running it with a nightly WebKit build from <
http://nightly.webkit.org
>? If you'll still see a problem with a nightly, please provide a test case.
chameleon
Comment 2
2009-09-22 05:35:53 PDT
Created
attachment 39915
[details]
php test file
chameleon
Comment 3
2009-09-22 05:43:55 PDT
I test it both with Safari and nightly WebKit. The same activity. I provide a php file which reproduce the bug. No other files needed. Open it with browser and after loading and clicking the alerts, click the link. It will reload the page, but the link is: <a href="" onclick="alert('you just clicked!'); return false;">click me! click me now!</a> The correct: Throws an alert with text 'you just clicked!' and return to page without reloading. PS: I am impressed from fast response.
Alexey Proskuryakov
Comment 4
2009-09-22 09:44:31 PDT
Thank you! This is pretty much the same as
bug 25130
, which talks about cloneContents() - so it is useful to know that cloneNode() is affected, too. The bugs will likely have a common fix, so I'm resolving this one as a duplicate. *** This bug has been marked as a duplicate of
bug 25130
***
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