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>

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:


(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:


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 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:30:47 UTC