- From: <bugzilla@jessica.w3.org>
- Date: Fri, 16 Mar 2012 20:54:01 +0000
- To: www-dom@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16409
Summary: DOM4: Consider LeafNode interface which Node inherits
from
Product: WebAppsWG
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DOM
AssignedTo: annevk@opera.com
ReportedBy: ajvincent@gmail.com
QAContact: public-webapps-bugzilla@w3.org
CC: mike@w3.org, www-dom@w3.org
Andreas Gal's domjs project ( https://github.com/andreasgal/dom.js ) has an
interesting idea: a separate class for "leaf nodes", which cannot have
children.
I wonder if this might be worth adding to the DOM4 spec, by splitting the Node
interface into two parts:
(1) A LeafNode interface which implements all the current Node's interface
properties except firstChild, childNodes, lastChild, insertBefore, appendChild,
replaceChild, and removeChild.
(2) A Node interface which inherits from LeafNode and adds those extracted
properties.
interface LeafNode : EventTarget;
interface Node : LeafNode;
It might make text nodes, comments, etc. - nodes that can't have children -
somewhat simpler.
I'm only asking for consideration of the idea.
--
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Friday, 16 March 2012 20:54:03 UTC