<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - DOMError should be constructible as per the DOM4 specification"
   href="https://bugs.webkit.org/show_bug.cgi?id=139173#c25">Comment # 25</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - DOMError should be constructible as per the DOM4 specification"
   href="https://bugs.webkit.org/show_bug.cgi?id=139173">bug 139173</a>
              from <span class="vcard"><a class="email" href="mailto:cdumez&#64;apple.com" title="Chris Dumez &lt;cdumez&#64;apple.com&gt;"> <span class="fn">Chris Dumez</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=139173#c24">comment #24</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=139173#c23">comment #23</a>)
&gt; &gt; (In reply to <a href="show_bug.cgi?id=139173#c22">comment #22</a>)
&gt; &gt; &gt; (In reply to <a href="show_bug.cgi?id=139173#c21">comment #21</a>)
&gt; &gt; &gt; &gt; Dear  All,
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt;       DOMError can be removed from Webkit, since File APIs are not using it,
&gt; &gt; &gt; &gt; though as per FileReader Spec:<a href="http://dev.w3.org/2006/webapi/FileAPI/">http://dev.w3.org/2006/webapi/FileAPI/</a>, the
&gt; &gt; &gt; &gt; error attribute still uses the DOMError. Also in MDN link DOMError is still
&gt; &gt; &gt; &gt; used in File APIs:
&gt; &gt; &gt; &gt; <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader.error">https://developer.mozilla.org/en-US/docs/Web/API/FileReader.error</a>
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Thanks
&gt; &gt; &gt; 
&gt; &gt; &gt; We still use DOMError in WebKit (for e.g. MediaStream and IndexedDB API,
&gt; &gt; &gt; CSSFontFaceLoadEvent). It is likely that the corresponding specifications
&gt; &gt; &gt; are not using DOMError anymore so our implementations would have to be
&gt; &gt; &gt; updated first.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; Dear  Chris,
&gt; &gt; 
&gt; &gt;       Yes right, we need to update our implementations for other module to
&gt; &gt; support using DOMError, may be later we can accept these changes, is it
&gt; &gt; right?
&gt; 
&gt; DOMError is still used in the W3C recommendation for IndexedDB
&gt; (<a href="http://www.w3.org/TR/IndexedDB/">http://www.w3.org/TR/IndexedDB/</a>)
&gt; 
&gt; The W3C recommendation for DOM4 (<a href="http://www.w3.org/TR/dom/">http://www.w3.org/TR/dom/</a>) still includes
&gt; DOMError in an appendix. It warns to not use it, and instead refer to
&gt; &quot;Error&quot; in WebIDL (<a href="http://www.w3.org/TR/WebIDL-1/">http://www.w3.org/TR/WebIDL-1/</a>)
&gt; 
&gt; The previous working draft for DOM4
&gt; (<a href="http://www.w3.org/TR/2015/PR-dom-20151006/">http://www.w3.org/TR/2015/PR-dom-20151006/</a>) explains the real impetus
&gt; behind that change - DOMError can't be removed because some specs still use
&gt; it (Namely IndexedDB).
&gt; 
&gt; WebIDL defines &quot;Error&quot; as the set of all objects that can be used to
&gt; represent an error, which correspond to the ECMAScript error objects
&gt; (<a href="http://people.mozilla.org/~jorendorff/es6-draft.html#sec-error-objects">http://people.mozilla.org/~jorendorff/es6-draft.html#sec-error-objects</a>)
&gt; 
&gt; ECMAScript error objects have a message property.
&gt; 
&gt; I have a few points for listing the current state of the specs WRT DOMError:
&gt; 1 - DOMError is baked into the final IndexedDB spec, and therefore we can't
&gt; remove it.
&gt; 2 - But DOMError is strongly deprecated.
&gt; 3 - DOMError's non-deprecated replacement is basically &quot;an object
&gt; representing an Error that has a message property&quot;
&gt; 4 - IndexedDB code sure would love to have custom messages in its DOMErrors
&gt; instead of just a generic error code.
&gt; 
&gt; My personal takeaway from all of the above is that we *should* add the the
&gt; message property to DOMError so it can better fulfill its purpose, but we
&gt; should NOT add the constructor.
&gt; 
&gt; I still think the message part of this patch is relevant, and I would love
&gt; to see it land soon.</span >

Sure, I don't have any issue with adding the message attribute to DOMError. My main concern was about starting to expose DOMError on the global object, considering it is legacy.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>