hawx1993 / base2

Automatically exported from code.google.com/p/base2
1 stars 0 forks source link

ViewCSS.getComputedStyle() broken under Firefox 3 #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Under Firefox 3.0.3 on Mac OS X, any call made to window.getComputedStyle() 
with Base2 1.0b2 
installed causes the following exception:

[Exception... "Cannot modify properties of a WrappedNative"  nsresult: 
"0x80570034 
(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"]

I'm not sure why this happening. As a workaround, I try bypassing the base2 
wrapper around 
that method when it throws an exception:

try {
    computed = window.getComputedStyle(element, "");
} catch (e) {
    // Work around a base2 bug.
    if (Window && Window.prototype) {
        computed = Window.prototype.getComputedStyle.call(window, element, "");
    }
}

Original issue reported on code.google.com by enaes...@gmail.com on 7 Oct 2008 at 6:50

GoogleCodeExporter commented 9 years ago
One more note: of course, this only happens when the window object has been 
bound with 
base2.DOM.bind(window).

Original comment by enaes...@gmail.com on 7 Oct 2008 at 6:52

GoogleCodeExporter commented 9 years ago
base2 does not support binding of the window object. window is not a DOM node 
and 
cannot be bound.

Original comment by dean.edw...@gmail.com on 8 Oct 2008 at 1:38

GoogleCodeExporter commented 9 years ago
Oops, I misspoke.

This happens when the window's document has been bound; base2 does in fact 
patch a bound document's 
default view.

Original comment by enaes...@gmail.com on 8 Oct 2008 at 4:33

GoogleCodeExporter commented 9 years ago
In that, case can you provide a test case please?

Original comment by dean.edw...@gmail.com on 8 Oct 2008 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by dean.edw...@gmail.com on 23 Dec 2008 at 6:46