On 1/16/2009 3:18 PM, P T Withington wrote:
On 2009-01-15, at 19:24EST, André Bargull wrote:

Are you sure your comment for "DefaultPresentationType" is valid, c.f. with "LzDataElementMixin#setAttr" where any non-string input produces a debug-warning (maybe it should just perform implicit string-coercion as in as3 instead of the warning...).

I think the implicit conversion in as3 is a bug. I think we really want to warn when someone sets a non-string value into a dataset, because that is how they will learn to update their application to operate correctly. (The string warning was added once presentation types were working.)

We _could_ make the default presentation type be 'string', but that would not be backwards compatible.

The LzDataNode,LzDataElement classes/mixins are indented to provide a DOM-like functionality. So I checked out what other DOM implementations do in that case (so how they handle non-string input where strings are expected). In Firefox, the input is coerced to a string, for example this creates a attribute-node with the node-name "hello":
  document.createAttribute({toString:function(){return "hello"}})

Is this covered somewhere in the DOM-spec?


Reply via email to