XUL:Element APIs

From MozillaWiki
Revision as of 01:00, 9 December 2005 by Ben (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some issues with existing element APIs:

Consistency of Attributes/Properties There should be more consistency of attributes, properties etc. Basically a comprehensive review and uplift. For example, some elements have an icon property called "image", others "src", some both.

Counter-Intuitive Binding Attachment Binding attachment is not intuitive. You ideally write code like so:

const XUL2NS = "http://www.mozilla.org/2006/xul";
var foo = document.createElementNS(XUL2NS, "foo");
foo.bar = true;
docElt.appendChild(foo);

...but it seldom works out that well. If an item has no frames constructed, attachment doesn't occur until it is inserted into the document.