<?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>24000</bug_id>
          
          <creation_ts>2013-12-05 08:33:20 +0000</creation_ts>
          <short_desc>DOMException should extend ES Error</short_desc>
          <delta_ts>2013-12-09 14:26:45 +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>Windows 3.1</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>23367</dup_id>
          
          <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="Marcos Caceres">w3c</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>w3c</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>97167</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2013-12-05 08:33:20 +0000</bug_when>
    <thetext>To make DOMException Promises friendly, the DOMException IDL definition needs to extend ES Error. See:
https://github.com/domenic/promises-unwrapping/issues/84

Testing the following:

&lt;script&gt;
try {
    document.body.appendChild(document.body)
} catch (e) {
    alert(e instanceof Error)
}
&lt;/script&gt;

The latest versions of Chrome, Safari, and IE return true. FF returns false.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97289</commentid>
    <comment_count>1</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-12-08 08:31:57 +0000</bug_when>
    <thetext>I think http://heycam.github.io/webidl/#es-exceptions already requires that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97293</commentid>
    <comment_count>2</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2013-12-08 13:36:58 +0000</bug_when>
    <thetext>(In reply to Ms2ger from comment #1)
&gt; I think http://heycam.github.io/webidl/#es-exceptions already requires that.

Why not just make it explicit? It seems we missed this in Gecko ... could it be possible that happened because DOMException does not specify it explicitly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97294</commentid>
    <comment_count>3</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-12-08 14:19:10 +0000</bug_when>
    <thetext>No, that happened because there was no real spec for this when we implemented DOMException as an interface in 2001.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97298</commentid>
    <comment_count>4</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2013-12-09 00:15:45 +0000</bug_when>
    <thetext>I&apos;m still not happy that the DOM Spec does not clarify this (or just make it explicit). It should at least contain a note.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97321</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-12-09 14:26:45 +0000</bug_when>
    <thetext>It is explicit by not using &quot;interface&quot; but &quot;exception&quot;. However, it sounds like what you want is a duplicate of a bug I filed a while ago.

*** This bug has been marked as a duplicate of bug 23367 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>