It seems some other elements are not working any more. I am now trying to run the test script but some elements are failing. The first one I checked till now is the peer.name and peer.name$ are changed to peer.$name and peer.$name$
jessevdamTue 26 Jul 2011
this
fan.dom.ElemPeer.prototype.get = function(self, name, def)
{
if (name == "id") return this.id(self);
if (name == "name") return this.name(self);
if (name == "class") return this.className(self);
if (name == "style") return this.style(self);
if (name == "value") return this.val(self);
if (name == "checked") return this.checked(self);
var val = this.elem[name];
if (val != null) return val;
if (def != null) return def;
return null;
}
fan.dom.ElemPeer.prototype.set = function(self, name, val)
{
if (name == "id") this.id$(self, val);
else if (name == "name") this.name$(self, val);
else if (name == "class") this.className$(self, val);
else if (name == "value") this.val$(self, val);
else if (name == "checked") this.checked$(self, val);
else this.elem.setAttribute(name, val);
}
should become
fan.dom.ElemPeer.prototype.get = function(self, name, def)
{
if (name == "id") return self.peer.id(self);
if (name == "name") return self.peer.$name(self);
if (name == "class") return self.peer.className(self);
if (name == "style") return self.peer.style(self);
if (name == "value") return self.peer.val(self);
if (name == "checked") return self.peer.checked(self);
var val = self.peer.elem[name];
if (val != null) return val;
if (def != null) return def;
return null;
}
fan.dom.ElemPeer.prototype.set = function(self, name, val)
{
if (name == "id") self.peer.id$(self, val);
else if (name == "name") self.peer.$name$(self, val);
else if (name == "class") self.peer.className$(self, val);
else if (name == "value") self.peer.val$(self, val);
else if (name == "checked") self.peer.checked$(self, val);
else self.peer.elem.setAttribute(name, val);
}
After fixing this all the test passed in the existing test script
jessevdamTue 26 Jul 2011
Here is an extra test function for the test script
jessevdam Tue 26 Jul 2011
Should this not be
Because it currently trying to get the attribute elem on the fantom object itself
The javascript compiler generates the following code for the add function in fantom
This test case is not included in the test script
andy Tue 26 Jul 2011
Thanks - pushed a fix
jessevdam Tue 26 Jul 2011
Thanks
It seems some other elements are not working any more. I am now trying to run the test script but some elements are failing. The first one I checked till now is the peer.name and peer.name$ are changed to peer.$name and peer.$name$
jessevdam Tue 26 Jul 2011
this
should become
After fixing this all the test passed in the existing test script
jessevdam Tue 26 Jul 2011
Here is an extra test function for the test script
andy Tue 26 Jul 2011
Yep that slipped thru - pushed a fix - and added add/remove to the test suite. Changeset
jessevdam Tue 26 Jul 2011
Thanks