<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29533</bug_id>
          
          <creation_ts>2009-09-20 18:21:07 -0700</creation_ts>
          <short_desc>Dynamically loaded scripts</short_desc>
          <delta_ts>2009-09-22 09:44:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>25130</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="chameleon">gessos.paul</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>148590</commentid>
    <comment_count>0</comment_count>
    <who name="chameleon">gessos.paul</who>
    <bug_when>2009-09-20 18:21:07 -0700</bug_when>
    <thetext>I have AJAX loaded XHTML with javascripts:
- External, as &lt;script src=&quot;...&quot; /&gt;
- Internal, as &lt;script&gt;alert(1);&lt;/script&gt;
- As action on events: &lt;a href=&quot;&quot; onclick=&quot;alert(5); return false;&quot;&gt;whow!&lt;/a&gt;

On external ( &lt;script src=&quot;...&quot; /&gt; ) I must create a &lt;script&gt; element and append on &lt;head&gt; element. This is a workaround needed on Firefox too, but not on Opera.

On internal ( &lt;script&gt;alert(1);&lt;/script&gt; ) 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 ( &lt;a href=&quot;&quot; onclick=&quot;alert(5); return false;&quot;&gt;whow!&lt;/a&gt; ) doesn&apos;t work at all. Work fine on Firefox / Opera.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148914</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-09-21 17:45:58 -0700</bug_when>
    <thetext>What browser are you seeing this problem with? If you&apos;re running Safari, could you please try running it with a nightly WebKit build from &lt;http://nightly.webkit.org&gt;?

If you&apos;ll still see a problem with a nightly, please provide a test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149016</commentid>
    <comment_count>2</comment_count>
      <attachid>39915</attachid>
    <who name="chameleon">gessos.paul</who>
    <bug_when>2009-09-22 05:35:53 -0700</bug_when>
    <thetext>Created attachment 39915
php test file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149020</commentid>
    <comment_count>3</comment_count>
    <who name="chameleon">gessos.paul</who>
    <bug_when>2009-09-22 05:43:55 -0700</bug_when>
    <thetext>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:

&lt;a href=&quot;&quot; onclick=&quot;alert(&apos;you just clicked!&apos;); return false;&quot;&gt;click me! click me now!&lt;/a&gt;

The correct:
Throws an alert with text &apos;you just clicked!&apos; and return to page without reloading.

PS: I am impressed from fast response.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149072</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-09-22 09:44:31 -0700</bug_when>
    <thetext>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&apos;m resolving this one as a duplicate.

*** This bug has been marked as a duplicate of bug 25130 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>39915</attachid>
            <date>2009-09-22 05:35:53 -0700</date>
            <delta_ts>2009-09-22 05:35:53 -0700</delta_ts>
            <desc>php test file</desc>
            <filename>index.php</filename>
            <type>text/plain</type>
            <size>1513</size>
            <attacher name="chameleon">gessos.paul</attacher>
            
              <data encoding="base64">PD9waHANCg0KaWYgKCRfR0VUWydhJ10gPT0gMSkgew0KCWhlYWRlcignQ29udGVudC10eXBlOiBh
cHBsaWNhdGlvbi94aHRtbCt4bWwnKTsJLy8gSUUgbWVzc2VkIHVwDQoJZWNobyAnPD94bWwgdmVy
c2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4nOw0KPz4NCjxkaXYgeG1sbnM9Imh0dHA6Ly93
d3cudzMub3JnLzE5OTkveGh0bWwiPg0KCTxhIGhyZWY9IiIgb25jbGljaz0iYWxlcnQoJ3lvdSBq
dXN0IGNsaWNrZWQhJyk7IHJldHVybiBmYWxzZTsiPmNsaWNrIG1lISBjbGljayBtZSBub3chPC9h
PjxiciAvPg0KCVRoZSBlcnJvciBvY2N1cnMgd2hlbiB5b3UgY2xpY2sgdGhlIGxpbmsgYWJvdmUu
Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uDQoJPHNjcmlwdD5hbGVydCgndGhpcyBz
Y3JpcHQgaXMgcnVubmluZyBmcm9tIEFKQVggZHluYW1pY2FsbHkgbG9hZGVkIGNvbnRlbnQhJyk7
PC9zY3JpcHQ+DQoJPHNjcmlwdCBzcmM9Ij9hPTIiIC8+DQo8L2Rpdj4NCjw/DQoJZGllOw0KfSBl
bHNlIGlmICgkX0dFVFsnYSddID09IDIpIHsNCj8+DQphbGVydCgndGhpcyBzY3JpcHQgaXMgYW4g
ZXh0ZXJuYWwgc2NyaXB0IG9uIEFKQVggZHluYW1pY2FsbHkgbG9hZGVkIGNvbnRlbnQhJyk7DQo8
Pw0KCWRpZTsNCn0NCg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