<?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>23186</bug_id>
          
          <creation_ts>2013-09-09 06:45:28 +0000</creation_ts>
          <short_desc>EventListener argument of addEventListener and removeEventListener should not be nullable</short_desc>
          <delta_ts>2014-02-19 01:40:57 +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>HISTORICAL - DOM3 Events</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>has-testcase</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Masayuki Nakano">masayuki</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>garykac</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93154</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-09-09 06:45:28 +0000</bug_when>
    <thetext>The definition table of arguments of addEventListener and removeEventListenr defines the EventListener as nullable (&quot;✔&quot;).

However, the explanation documents: The listener parameter MUST be an object that implements the EventListener interface or a function.

Additionally, I have no idea the purpose of the argument nullable.

So, I think that they should be &quot;✘&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93155</commentid>
    <comment_count>1</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-09-09 07:50:08 +0000</bug_when>
    <thetext>No, that would imply throwing an exception when null is passed. No browser does that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93156</commentid>
    <comment_count>2</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-09-09 08:01:16 +0000</bug_when>
    <thetext>https://github.com/w3c/web-platform-tests/pull/322</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93190</commentid>
    <comment_count>3</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-09-10 09:58:07 +0000</bug_when>
    <thetext>So, did you mean that it should be nullable but implementations must throw an error if null is passed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93191</commentid>
    <comment_count>4</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-09-10 10:09:48 +0000</bug_when>
    <thetext>&gt; No, that would imply throwing an exception when null is passed.
&gt; No browser does that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95196</commentid>
    <comment_count>5</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2013-10-23 14:17:19 +0000</bug_when>
    <thetext>Updated text in the ED to explicitly say:
&quot;If non-null, the listener parameter MUST ...&quot;

But I don&apos;t see the point of allowing this parameter to be non-null. Adding or removing a null eventlistener seems useless.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97098</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-12-04 02:17:29 +0000</bug_when>
    <thetext>&gt; But I don&apos;t see the point of allowing this parameter to be non-null.

The point would be if there is code on the web that does that and doesn&apos;t expect an exception.

Given that no UA throws on null here, I don&apos;t think the spec should require the throwing behavior, unless you have some sort of indication that it is in fact web-compatible.  Which I doubt it is, frankly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97099</commentid>
    <comment_count>7</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2013-12-04 02:33:26 +0000</bug_when>
    <thetext>Another way to put it: Which browsers would be willing to go first with such a change?

I agree that the risk/reward ratio of changing existing implementations seem too low here.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>