I don't think the UserData handler implementation is right, see [1].
We don't need to resp. we cannot support:
- NODE_ADOPTED (we don't support the concept of Document.adoptNode())
- NODE_DELETED (this is not removal of a node)
- NODE_IMPORTED (we don't support the concept of Document.importNode())
There is only left:
- NODE_RENAMED (already supported through onnodeName event)
- NODE_CLONED
And the handler is not a function but an instance of UserDataHandler:
+public function setUserData(key:String, data:*, handler:Function):* {
So that needs to be more like:
public function setUserData(key:String, data:*, handler:Object):* {
Or more strictly typed:
public function setUserData(key:String, data:*, handler:UserDataHandler):* {
where `handler` needs to have a function-property called "handle". An
example is provided at MDC [2].
And related to that:
+ handler.call(this, op, k, val, src, dst);
This should be:
handler.handle(op, k, val, src, dst);
[1]
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-UserDataOperation
[2] https://developer.mozilla.org/En/DOM/Node.setUserData
On 4/29/2009 5:18 PM, Henry Minsky wrote:
Change 20090429-hqm-L by [email protected] on 2009-04-29 11:13:14 EDT
in /Users/hqm/openlaszlo/trunk4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Implement the DOM Level3 UserData interface
New Features:
Bugs Fixed: LPP-8122
Technical Reviewer: max
QA Reviewer: andre
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ implement the UserData API on LzDataElement
+ still need to write a few more tests, but wanted to get this out for
review
Tests:
test/lfc/data/alldata.lzx in swf9, swf8,dhtml
Files:
M test/lfc/data/alldata.lzx
A test/lfc/data/userdata.lzx
M WEB-INF/lps/lfc/data/LzDataElement.lzs
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090429-hqm-L.tar