This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I would like your help in figuring out how we should define NodeFilter per the latest Web IDL as implementations might have to change. http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nodefilter http://dev.w3.org/2006/webapi/WebIDL/ The simplest I could come up with was to put all the constants on an exposed NodeFilter interface and put the acceptNode() method on a separate NodeFilterCallback callback interface.
Or you could just write it as callback interface NodeFilter { const ...; ... unsigned short acceptNode(Node node); }; since callback interfaces that have constants on them do get an interface object (but not prototype property on there). http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces The only problem with that is if you want to disallow { acceptNode: ... } being used as a NodeFilter. If compatibility doesn't require it, then doing what you suggest would be OK.
Why would we want to get rid of { acceptNode: ... }?
Ah, nice Cameron! https://bitbucket.org/ms2ger/dom-core/changeset/1e5db6bdc60b