[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: ISSUE: what does 'get..' return?
Hi WebCGM TC, I'm working on the DOM test case for ApsAttr 'viewcontext', and think that we ought to clarify something about the 'get...' methods. Specifically I'm working with getAppStructureAttr, section 5.7.6 (but this probably applies somewhere else as well). Let's consider the case of 'viewcontext' first. Section 3.2.2.2 says "Initial value: none", which is reasonable. If I getAppStructureAttr on an APS where there is no explicit 'viewcontext' ApsAttr, then the answer should be "undefined" (see side-issue about "undefined" below). This is the way DOM2 works, so we should stick with that unless we have a compelling reason to deviate. Now let's consider the case of 'interactivity'. Section 3.2.2.10 says "Initial value: on". If I getAppStructureAttr on an APS where there is no explicit 'viewcontext' ApsAttr, then should the answer should be "undefined", or should it be "on"? Benoit and I have discussed it a bit. The answer should be "undefined". Here's our reasoning: 1.) when we say "initial value", we really mean initial graphical effect in an (interactive) graphical viewer, in the case that a given APS doesn't have an explicit occurrence of the 'interactivity' ApsAttr. 2.) we do not mean default in the sense of an XML attribute default, which would be DOM-visible in the structure tree. 3.) SVG considered and discussed this point ever since 1.0, and has made this same distinction. 4.) If we agree that it is not an XML-attribute-like default, but rather an initial graphical effect, then DOM2 is clear that it should not be returned by calls to the "get..." methods. Rather, the value DOM-visible value is "undefined". Unless someone disagrees with this interpretation, I think it would be useful to clarify this in the spec -- it would have saved me a bunch of head scratching and thinking about it. Side-issue: binding of "undefined". In JavaScript, what do we want to be the value for an "undefined" return from getAppStructureAttr? Would it be the JavaScript 'null' reserved keyword (seemingly the most obvious choice)? Or would it be an empty string? Or ...? Regards, -Lofton.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]