[Webkit-unassigned] [Bug 81972] New: Consider making the global scope pollution by names/ids quirks-only

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 22 14:51:35 PDT 2012


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

           Summary: Consider making the global scope pollution by
                    names/ids quirks-only
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptGlue
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jonas at sicking.cc
                CC: ian at hixie.ch, annevankesteren+webkit at gmail.com,
                    ojan at chromium.org


Hi All,

All browsers currently do things which cause window.foo to return <a name=foo>. While this is convenient, it means that using global variables is pretty error-prone since modifications to the DOM can make global variables appear and disappear. Basically it means that global variables share namespace with various elements in the DOM.

In Gecko this behavior is limited to quirks mode only. That way we at least reduce the risk of bugs for pages in standards mode.

There was a bug filed against the HTML5 spec to limit this to quirks only, however the request was denied, in large part because webkit doesn't limit behavior to quirks mode.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=11960

In Gecko we've had very few problems with limiting this to quirks mode, though Microsoft claims that they would see more breakage if they made this change and so they have so far resisted (see bug above).

However recently microsoft wrote a demo which relied on the global scope polluter in standards mode, and since we so far have seen very little support from other browser vendors for the Gecko solution, we are now considering changing gecko. However if we can get support from safari and chrome to remove the global scope polluter in standards mode, we would be able to stick to our current solution and hopefully we can persuade Hixie to change the spec.

Anne recently filed a bug on Opera so hopefully we can see a change there too.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list