W3C home > Mailing lists > Public > public-html-commits@w3.org > August 2008

html5/spec Overview.html,1.1186,1.1187

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 05 Aug 2008 07:51:24 +0000
To: public-html-commits@w3.org
Message-Id: <E1KQHKG-00057K-My@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv19643

Modified Files:
	Overview.html 
Log Message:
define what happens when you set onclick='' on a document outside a Window (whatwg r1998)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1186
retrieving revision 1.1187
diff -u -d -r1.1186 -r1.1187
--- Overview.html	5 Aug 2008 06:36:51 -0000	1.1186
+++ Overview.html	5 Aug 2008 07:51:21 -0000	1.1187
@@ -32475,6 +32475,7 @@
 
   <h5 id=event-handler-attributes><span class=secno>5.4.4.1. </span>Event
    handler attributes</h5>
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aw(a%3Ddocument.implementation.createDocument(null%2C%20null%2C%20null))%3B%0Aw(a.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'html')))%3B%0Aw(b%3Da.firstChild.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'body')))%3B%0Aw(b.test%20%3D%20w)%3B%0Aw(b.setAttribute('onclick'%2C%20'test(%22fire%3A%20%22%20%2B%20event)'))%3B%0Aw(b.onclick)%3B%0Aw(e%3Da.createEvent('Event'))%3B%0Aw(e.initEvent('click'%2C%20false%2C%20false))%3B%0Aw(b.dispatchEvent(e))%3B%0A%3C%2Fscript%3E -->
 
   <p><a href="#html-elements">HTML elements</a> can have <dfn id=event2>event
    handler attributes</dfn> specified. These act as bubbling event listeners
@@ -32500,12 +32501,13 @@
    href="#references">[ECMA262]</a></p>
   <!-- SCRIPT EXEC -->
 
-  <p>When an event handler content attribute is set, its new value must be
-   interpreted as the body of an anonymous function with a single argument
-   called <code>event</code>, with the new function's scope chain being
-   linked from the activation object of the handler, to the element, to the
-   element's <code>form</code> element if it is a form control, to the
-   <code>Document</code> object, to the <code><a
+  <p>When an event handler content attribute is set, if the element is owned
+   by a <code>Document</code> that is in a <a href="#browsing1">browsing
+   context</a>, its new value must be interpreted as the body of an anonymous
+   function with a single argument called <code>event</code>, with the new
+   function's scope chain being linked from the activation object of the
+   handler, to the element, to the element's <code>form</code> element if it
+   is a form control, to the <code>Document</code> object, to the <code><a
    href="#window">Window</a></code> object of the <a
    href="#browsing1">browsing context</a> of that <code>Document</code>. The
    function's <code>this</code> parameter must be the <code>Element</code>
@@ -32525,6 +32527,10 @@
    event handler must be the <code>Document</code> object that owns the event
    handler content attribute that was set.
 
+  <p>When an event handler content attribute is set on an element owned by a
+   <code>Document</code> that is not in a <a href="#browsing1">browsing
+   context</a>, the corresponding event handler attribute is not changed.
+
   <p class=big-issue>How do we allow non-JS event handlers?
 
   <p><dfn id=event4>Event handler DOM attributes</dfn>, on setting, must set
Received on Tuesday, 5 August 2008 07:52:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 9 October 2008 20:32:58 GMT