pombreda / base2

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

base2ID is present on FORM elements before element is bound #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This isn't really a bug - I was expecting the base2ID attribute to indicate
that an element has been fixed and doesn't need base2.DOM.bind() to be
called. This isn't reliable in the case of FORM elements. 

What steps will reproduce the problem?

Use the following HTML on IE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html>
<head>
<title>base2 HTMLFormElement.dispatchEvent test</title>
<script type="text/javascript"
src="http://base2.googlecode.com/svn/trunk/lib/base2-dom-fp.js"></script>
<script>
base2.JavaScript.bind(window);
base2.DOM.bind(document);
window.setTimeout(function() {
var form = document.getElementsByTagName("form")[0];
alert(form.base2ID+": "+form.dispatchEvent);
}, 1000);
</script>
</head>
<body>
<form>
  <input type="text" />
</form>
</body>
</html>

What is the expected output? What do you see instead?
Expected to alert "b2_xx: function() { ... }"
Actually alerts "b2_xx: undefined"

What version of the product are you using? On what operating system?
version-1.0 and current on IE

Original issue reported on code.google.com by shogu...@gmail.com on 12 May 2009 at 6:50

GoogleCodeExporter commented 9 years ago
base2ID is *not* an indicator that an element is bound.

You can test if an element is bound using the following code:

var isbound = !!base2.DOM.bind[element.base2ID];

I'm setting the status to "WontFix" unless you have any objections?

Original comment by dean.edw...@gmail.com on 21 Jun 2009 at 3:58

GoogleCodeExporter commented 9 years ago
No objections. Thanks for the tip. 

Original comment by shogu...@gmail.com on 21 Jun 2009 at 11:55