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.