- From: Cameron McCormack <cam@mcc.id.au>
- Date: Sun, 26 Oct 2008 02:11:53 +1100
- To: public-svg-wg@w3.org
Hello WG. As discussed the other day, here is a proposed change to the Scripting chapter to ensure that the equivalent Function object can not be broken out of. Change from: In ECMAScript, the contents of the 'handler' element behave conceptually as if they are the contents of a new Function object, created as shown: function(event) { var evt = event; // contents of handler } The 'event' parameter shown above is an Event object corresponding to the event that has triggered the 'handler'. An 'evt' variable can be used instead of 'event' ('evt' is an alias to 'event'). to: If a 'handler' element is declared to have ECMAScript contents, then the event listener that it represents is conceptually equivalent to a Function object created as shown: function(event) { var evt = event; // contents of handler } The 'event' parameter shown above is an Event object corresponding to the event that has triggered the 'handler'. This object can also be referred to using the 'evt' identifier. Note that to avoid the contents of the 'handler' being able to break out of the event listener function, it must match the FunctionBody production ([ECMA-262], section 13). -- Cameron McCormack ≝ http://mcc.id.au/
Received on Saturday, 25 October 2008 15:12:41 UTC