<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15356</bug_id>
          
          <creation_ts>2011-12-28 15:47:36 +0000</creation_ts>
          <short_desc>NodeFilter callback</short_desc>
          <delta_ts>2011-12-29 12:30:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>ap</cc>
    
    <cc>ayg</cc>
    
    <cc>bugs</cc>
    
    <cc>cam</cc>
    
    <cc>darin</cc>
    
    <cc>ian</cc>
    
    <cc>jonas</cc>
    
    <cc>jrossi</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>ojan</cc>
    
    <cc>travil</cc>
    
    <cc>www-dom</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62101</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-12-28 15:47:36 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62116</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2011-12-28 23:59:42 +0000</bug_when>
    <thetext>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&apos;t require it, then doing what you suggest would be OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62124</commentid>
    <comment_count>2</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2011-12-29 12:24:10 +0000</bug_when>
    <thetext>Why would we want to get rid of { acceptNode: ... }?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62125</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-12-29 12:30:53 +0000</bug_when>
    <thetext>Ah, nice Cameron!

https://bitbucket.org/ms2ger/dom-core/changeset/1e5db6bdc60b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>