Hi, i have created a script to associate data to dom nodes, something like the jQuery.data method. Basically the script sets a property on the node that is the key of an object that will contain the data of every node, but in IE 7 setting a property on a text node throws an error:
var a=document.createElement("div");
a.test="test";
alert(a.test); //Works and shows "test"
var a=document.createTextNode("text");
a.test="test"; //Throws an error
So do you know a workaround for this bug? Or maybe is there a property that is almost useless on text nodes that allows me to set data on it?