PhilCodeEx / base2

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

Function.bind() defined in Firefox 4 conflicts with Base2's own bind()s. #133

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
run test/DOM/selectors-api/bound.html from svn on Firefox 4 beta 1.

Simple test case:
1. base2.DOM.bind(document);
2. var l = document.querySelectorAll(...);

What is the expected output? What do you see instead?
l is real DOM NodeList, not a Base2 StaticNodeList; and thus doesn't have a 
forEach() method or any other decoration added by Base.

Please provide any additional information below.
The same goes for Function2.bind and JavaScript.bind (tested against version 
1.0 only).

The reason seems to be that the DOM.bind function (and all other bind() 
functions) conflicts with Firefox 4's new bind() function 
(https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/b
ind).

Since a native bind() function exists, the redefined one implemented in Base2 
is dropped, dropping with it the automatic binding of the elements returned by 
querySelector (for the issue at hand). Changing names works.

Original issue reported on code.google.com by vincent....@gmail.com on 9 Sep 2010 at 2:33

GoogleCodeExporter commented 8 years ago
I just issued a bug fix release for this problem:

http://base2.googlecode.com/svn/version/1.0.1/

Original comment by dean.edw...@gmail.com on 9 Sep 2010 at 7:21