W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > March 2010

[Bug 7851] Some (perhaps all) scripts with a for="" attribute should be ignored

From: <bugzilla@wiggum.w3.org>
Date: Sun, 14 Mar 2010 18:32:38 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1NqscA-0005qf-Mi@wiggum.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=7851


Maciej Stachowiak <mjs@apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #4 from Maciej Stachowiak <mjs@apple.com>  2010-03-14 18:32:38 ---
I recently learned that Mozilla has a fancier rule than just blocking execution
of all scripts with a for attribute, and at least some aspects of their rule
are required for Web compatibility. 

Here are their rules (now also implemented in WebKit trunk):
          -If there's only a 'for' attribute, execute it.
          -If there's only an 'event' attribute, execute it.
          -If there's a 'for=window' and 'event=onload', execute it.
          -If there's a 'for=window' and 'event=onload()', execute it.
          -If there's any other combination of both 'for' and 'event', don't
execute it.

The WebKit bug that led us to change this was:

https://bugs.webkit.org/show_bug.cgi?id=35556

(Note that executing all scripts with a for attribute is not Web-compatible
either, here is an example of the type of bug it may cause:

https://bugs.webkit.org/show_bug.cgi?id=21193
)


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Sunday, 14 March 2010 18:32:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 14 March 2010 18:32:40 GMT