Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
authorRich Tibbett <richt@opera.com>
Thu, 29 Aug 2013 11:01:15 +0200
changeset 447 5e36d90b8960
parent 446 fdf57e69bf2b
child 448 865b6f93faac
Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
discovery-api/Overview.html
discovery-api/Overview.src.html
--- a/discovery-api/Overview.html	Tue Aug 20 23:36:58 2013 +0300
+++ b/discovery-api/Overview.html	Thu Aug 29 11:01:15 2013 +0200
@@ -204,8 +204,12 @@
     <link rel="stylesheet"
           href="https://www.w3.org/StyleSheets/TR/W3C-ED">
   </head>
-  <body class="h-entry">
-    <div class="head">
+  <body class="h-entry"
+        role="document"
+        id="respecDocument">
+    <div class="head"
+         role="contentinfo"
+         id="respecHeader">
       <p>
         <a href="http://www.w3.org/"><img width="72"
              height="48"
@@ -219,10 +223,10 @@
       </h1>
       <h2 property="dcterms:issued"
           datatype="xsd:dateTime"
-          content="2013-08-11T22:14:32.000Z"
-          id="w3c-editor-s-draft-12-august-2013">
+          content="2013-08-29T06:58:44.000Z"
+          id="w3c-editor-s-draft-29-august-2013">
         <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published"
-            datetime="2013-08-12">12 August 2013</time>
+            datetime="2013-08-29">29 August 2013</time>
       </h2>
       <dl>
         <dt>
@@ -279,7 +283,9 @@
              typeof="bibo:Chapter"
              resource="#abstract"
              rel="bibo:chapter">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_abstract">
         Abstract
       </h2>
       <p>
@@ -293,7 +299,9 @@
              typeof="bibo:Chapter"
              resource="#sotd"
              rel="bibo:chapter">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_sotd">
         Status of This Document
       </h2>
       <p>
@@ -336,10 +344,15 @@
       </p>
     </section>
     <section id="toc">
-      <h2 class="introductory">
+      <h2 class="introductory"
+          aria-level="1"
+          role="heading"
+          id="h2_toc">
         Table of Contents
       </h2>
-      <ul class="toc">
+      <ul class="toc"
+          role="directory"
+          id="respecContents">
         <li class="tocline">
           <a href="#introduction"
               class="tocxref"><span class="secno">1.</span> Introduction</a>
@@ -483,7 +496,9 @@
     </section>
     <section class="informative"
              id="introduction">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_introduction">
         <span class="secno">1.</span> Introduction
       </h2>
       <p>
@@ -513,8 +528,8 @@
       <p>
         If a service connectivity request is successful then the Web page is provided with a promise-based success
         callback with the all necessary information to communicate with the authorized Local-networked Service. If the
-        request fails then the Web page will receive a promise-based error callback containing an error code describing
-        the cause of Local-networked Service connectivity failure.
+        request fails then the Web page will receive a promise-based error callback containing an error string
+        describing the cause of Local-networked Service connectivity failure.
       </p>
       <p>
         Once connected to a Local-networked Service the Web page can send requests and receive responses to the
@@ -579,7 +594,7 @@
 "pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
   console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class=
 "pln"> </span><span class="str">"Error occurred: "</span><span class="pln"> </span><span class=
-"pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">code </span><span class=
+"pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">name </span><span class=
 "pun">);</span><span class="pln">
 </span><span class="pun">}</span><span class="pln">
 
@@ -631,7 +646,9 @@
              typeof="bibo:Chapter"
              resource="#conformance"
              rel="bibo:chapter">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_conformance">
         <span class="secno">2.</span> Conformance
       </h2>
       <p>
@@ -684,7 +701,9 @@
            leaving the attribute on the object but making it return null or throw an exception is insufficient.
       </p>
       <section id="dependencies">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_dependencies">
           <span class="secno">2.1</span> Dependencies
         </h3>This specification relies on several other underlying specifications.
         <dl>
@@ -707,7 +726,9 @@
       </section>
     </section>
     <section id="terminology">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_terminology">
         <span class="secno">3.</span> Terminology
       </h2>
       <p>
@@ -773,7 +794,9 @@
       </ul>
     </section>
     <section id="security-and-privacy-considerations">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_security-and-privacy-considerations">
         <span class="secno">4.</span> Security and privacy considerations
       </h2>
       <p>
@@ -789,7 +812,9 @@
            express permission.
       </p>
       <section id="privacy-considerations-for-api-implementations">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_privacy-considerations-for-api-implementations">
           <span class="secno">4.1</span> Privacy considerations for <abbr title=
           "Application Programming Interface">API</abbr> implementations
         </h3>
@@ -828,7 +853,9 @@
       </section>
       <section class="informative"
                id="additional-api-implementation-considerations">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_additional-api-implementation-considerations">
           <span class="secno">4.2</span> Additional <abbr title="Application Programming Interface">API</abbr>
           implementation considerations
         </h3>
@@ -854,7 +881,9 @@
       </section>
     </section>
     <section id="requesting-networked-services">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_requesting-networked-services">
         <span class="secno">5.</span> Requesting networked services
       </h2>
       <pre class="widl">
@@ -864,20 +893,16 @@
      href="http://dom.spec.whatwg.org/#promise">Promise</a> <a href=
      "#dom-navigator-getnetworkservices">getNetworkServices</a>( in any type );
 };
+
 <a class="externalDFN"
      href=
      "http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href=
      "#navigatornetworkservice">NavigatorNetworkService</a>;
-
-[NoInterfaceObject]
-interface <dfn id="navigatornetworkserviceerror">NavigatorNetworkServiceError</dfn> {
-  const unsigned short <a href="#dom-navigatornetworkserviceerror-permission_denied">PERMISSION_DENIED_ERR</a> = 1;
-  const unsigned short <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix">UNKNOWN_TYPE_PREFIX_ERR</a> = 2;
-  readonly attribute unsigned short <a href="#dom-navigatornetworkserviceerror-code">code</a>;
-};
 </pre>
       <section id="methods">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_methods">
           <span class="secno">5.1</span> Methods
         </h3>
         <dl class="domintro">
@@ -945,12 +970,12 @@
                   below. Otherwise, reject <var>Network Service Promise</var> by running the <a href=
                   "http://dom.spec.whatwg.org/#concept-resolver-reject"
                   class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
-                  Resolver</var>, passing in a new <a href=
-                  "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
-                  "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
-                  (<a href=
-                  "#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as
-                  its argument, abort any remaining steps and return.
+                  Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
+                  class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the string
+                  value "UnknownTypePrefixError" (<a href=
+                  "#dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) and whose
+                  <code>message</code> attribute has a helpful implementation-dependent message that explains this
+                  error, abort any remaining steps and return.
             </li>
             <li>
               <em>Process</em>: Let <var>services found</var> be an empty array.
@@ -984,12 +1009,12 @@
                   title="MAY">MAY</em> reject <var>Network Service Promise</var> by running the <a href=
                   "http://dom.spec.whatwg.org/#concept-resolver-reject"
                   class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
-                  Resolver</var>, passing in a new <a href=
-                  "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
-                  "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
-                  (<a href=
-                  "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
-                  argument, abort any remaining steps and return.
+                  Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
+                  class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the string
+                  value "PermissionDeniedError" (<a href=
+                  "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) and whose
+                  <code>message</code> attribute has a helpful implementation-dependent message that explains this
+                  error, abort any remaining steps and return.
             </li>
             <li>The user agent <em class="rfc2119"
                   title="MUST NOT">MUST NOT</em> provide the entry script's origin with a <a href=
@@ -1030,12 +1055,12 @@
                    title="MUST">MUST</em> reject <var>Network Service Promise</var> by running the <a href=
                    "http://dom.spec.whatwg.org/#concept-resolver-reject"
                    class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
-                   Resolver</var>, passing in a new <a href=
-                   "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
-                   "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
-                   (<a href=
-                   "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
-                   argument, abort any remaining steps and return.
+                   Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
+                   class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the
+                   string value "PermissionDeniedError" (<a href=
+                   "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) and whose
+                   <code>message</code> attribute has a helpful implementation-dependent message that explains this
+                   error, abort any remaining steps and return.
               </p>
               <p>
                 If the user never responds or no previously-established user preference has been met, this algorithm
@@ -1157,44 +1182,46 @@
         </div>
       </section>
       <section id="error-handling">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_error-handling">
           <span class="secno">5.2</span> Error Handling
         </h3>
         <dl class="domintro">
           <dt>
-            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-code"><a href=
-            "#dom-navigatornetworkserviceerror-code">code</a></code>
+            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-name"><a href=
+            "#dom-domerror-extensions-name">name</a></code>
           </dt>
           <dd>
             <p>
-              Returns the current error's error code. At the current time, this will be <code>1</code> or
-              <code>2</code>, for which the corresponding error constants <a href=
-              "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href=
-              "#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are
-              defined.
+              Returns the current error's error name. At the current time, this will be "PermissionDeniedError" or
+              "UnknownTypePrefixError", for which the corresponding error constants <a href=
+              "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href=
+              "#dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are defined.
             </p>
           </dd>
         </dl>
         <p>
-          The <dfn id="dom-navigatornetworkserviceerror-code"
-             title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a <a href=
-             "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class=
-             "ct"><em class="rfc2119"
-              title="MUST">MUST</em></em> return the code for the error, which will be one of the following:
+          The <dfn id="dom-domerror-extensions-name"
+             title="dom-domerror-extensions-name"><code>name</code></dfn> attribute of a <a href=
+             "http://dom.spec.whatwg.org/#domerror"
+             class="externalDFN"><code>DOMError</code></a> object returned from this <abbr title=
+             "Application Programming Interface">API</abbr> <em class="ct"><em class="rfc2119"
+              title="MUST">MUST</em></em> return the name for the error, which will be one of the following:
         </p>
         <dl>
           <dt>
-            <dfn id="dom-navigatornetworkserviceerror-permission_denied"
-                title="dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn>
-                (numeric value 1)
+            <dfn id="dom-domerror-extensions-permission_denied"
+                title="dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn> (DOMString
+                value "PermissionDeniedError")
           </dt>
           <dd>
             The user or user agent denied the page permission to access any services.
           </dd>
           <dt>
-            <dfn id="dom-navigatornetworkserviceerror-unknown_type_prefix"
-                title="dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
-                (numeric value 2)
+            <dfn id="dom-domerror-extensions-unknown_type_prefix"
+                title="dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
+                (DOMString value "UnknownTypePrefixError")
           </dt>
           <dd>
             No <a href="#dfn-valid-service-type"
@@ -1204,7 +1231,9 @@
       </section>
     </section>
     <section id="obtaining-networked-services">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_obtaining-networked-services">
         <span class="secno">6.</span> Obtaining networked services
       </h2>
       <p>
@@ -1242,7 +1271,9 @@
      class="externalDFN">EventTarget</a>;
 </pre>
       <section id="attributes">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_attributes">
           <span class="secno">6.1</span> Attributes
         </h3>
         <dl class="domintro">
@@ -1287,7 +1318,9 @@
         </div>
       </section>
       <section id="methods-1">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_methods-1">
           <span class="secno">6.2</span> Methods
         </h3>
         <dl class="domintro">
@@ -1334,8 +1367,9 @@
         </p>
         <div class="note">
           <div class="note-title"
+               aria-level="3"
                role="heading"
-               aria-level="4">
+               id="h_note_1">
             <span>Note</span>
           </div>
           <p class="">
@@ -1363,7 +1397,9 @@
         </p>
       </section>
       <section id="events">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_events">
           <span class="secno">6.3</span> Events
         </h3>
         <p>
@@ -1407,7 +1443,9 @@
       </section>
     </section>
     <section id="communicating-with-a-networked-service">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_communicating-with-a-networked-service">
         <span class="secno">7.</span> Communicating with a networked service
       </h2>
       <p>
@@ -1441,7 +1479,9 @@
      class="externalDFN">EventTarget</a>;
 </pre>
       <section id="attributes-1">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_attributes-1">
           <span class="secno">7.1</span> Attributes
         </h3>
         <dl class="domintro">
@@ -1526,7 +1566,9 @@
         </p>
       </section>
       <section id="states">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_states">
           <span class="secno">7.2</span> States
         </h3>
         <dl class="domintro">
@@ -1552,7 +1594,9 @@
         </p>
       </section>
       <section id="events-1">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_events-1">
           <span class="secno">7.3</span> Events
         </h3>
         <p>
@@ -1605,7 +1649,9 @@
       </section>
     </section>
     <section id="service-discovery">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_service-discovery">
         <span class="secno">8.</span> Service Discovery
       </h2>
       <p>
@@ -1831,7 +1877,9 @@
            <code>id</code> attribute as the only argument.
       </p>
       <section id="zeroconf-mdns-dns-sd">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_zeroconf-mdns-dns-sd">
           <span class="secno">8.1</span> Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title=
           "Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
         </h3>
@@ -1896,7 +1944,9 @@
         </ol>
       </section>
       <section id="simple-service-discovery-protocol-ssdp">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_simple-service-discovery-protocol-ssdp">
           <span class="secno">8.2</span> Simple Service Discovery Protocol (<abbr title=
           "Simple Service Discovery Protocol">SSDP</abbr>)
         </h3>
@@ -2289,7 +2339,9 @@
         </p>
       </section>
       <section id="discovery-and-launch-protocol-dial">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_discovery-and-launch-protocol-dial">
           <span class="secno">8.3</span> Discovery and Launch Protocol (<abbr title=
           "Discovery and Launch Protocol">DIAL</abbr>)
         </h3>
@@ -2444,7 +2496,9 @@
         </ol>
       </section>
       <section id="network-topology-monitoring">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_network-topology-monitoring">
           <span class="secno">8.4</span> Network Topology Monitoring
         </h3>
         <div>
@@ -2472,7 +2526,9 @@
       </section>
     </section>
     <section id="events-summary">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_events-summary">
         <span class="secno">9.</span> Events Summary
       </h2>
       <p>
@@ -2568,7 +2624,9 @@
       </table>
     </section>
     <section id="garbage-collection">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_garbage-collection">
         <span class="secno">10.</span> Garbage collection
       </h2>
       <p>
@@ -2578,8 +2636,9 @@
       </p>
       <div class="note">
         <div class="note-title"
+             aria-level="2"
              role="heading"
-             aria-level="3">
+             id="h_note_2">
           <span>Note</span>
         </div>
         <p class="">
@@ -2609,7 +2668,9 @@
       </p>
     </section>
     <section id="use-cases-and-requirements">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_use-cases-and-requirements">
         <span class="secno">11.</span> Use Cases and Requirements
       </h2>
       <p>
@@ -2685,7 +2746,9 @@
     </section>
     <section class="informative appendix"
              id="examples">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_examples">
         <span class="secno">A.</span> Examples
       </h2>
       <p>
@@ -3120,7 +3183,7 @@
 "pln"> error </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
     debug</span><span class="pun">.</span><span class="pln">innerHTML </span><span class="pun">+=</span><span class=
 "pln"> </span><span class="str">"&lt;br&gt;An error occurred: "</span><span class="pln"> </span><span class=
-"pun">+</span><span class="pln"> error</span><span class="pun">.</span><span class="pln">code</span><span class=
+"pun">+</span><span class="pln"> error</span><span class="pun">.</span><span class="pln">name</span><span class=
 "pun">;</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 </span><span class="tag">&lt;/script&gt;</span>
@@ -3128,7 +3191,9 @@
       </div>
     </section>
     <section id="acknowledgements">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_acknowledgements">
         <span class="secno">B.</span> Acknowledgements
       </h2>
       <p>
@@ -3154,14 +3219,18 @@
              typeof="bibo:Chapter"
              resource="#references"
              rel="bibo:chapter">
-      <h2>
+      <h2 aria-level="1"
+          role="heading"
+          id="h2_references">
         <span class="secno">C.</span> References
       </h2>
       <section id="normative-references"
                typeof="bibo:Chapter"
                resource="#normative-references"
                rel="bibo:chapter">
-        <h3>
+        <h3 aria-level="2"
+            role="heading"
+            id="h3_normative-references">
           <span class="secno">C.1</span> Normative references
         </h3>
         <dl class="bibliography"
@@ -3186,8 +3255,9 @@
             [HTML5]
           </dt>
           <dd rel="dcterms:requires">
-            Robin Berjon et al. <a href="http://www.w3.org/TR/html5/"><cite>HTML5</cite></a>. 17 December 2012. W3C
-            Candidate Recommendation. URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
+            Robin Berjon; Steve Faulkner; Travis Leithead; Erika Doyle Navara; Edward O'Connor; Silvia Pfeiffer.
+            <a href="http://www.w3.org/TR/html5/"><cite>HTML5</cite></a>. 6 August 2013. W3C Candidate Recommendation.
+            URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
           </dd>
           <dt id="bib-MDNS">
             [MDNS]
--- a/discovery-api/Overview.src.html	Tue Aug 20 23:36:58 2013 +0300
+++ b/discovery-api/Overview.src.html	Thu Aug 29 11:01:15 2013 +0200
@@ -145,8 +145,8 @@
       <p>
         If a service connectivity request is successful then the Web page is provided with a promise-based success
         callback with the all necessary information to communicate with the authorized Local-networked Service. If the
-        request fails then the Web page will receive a promise-based error callback containing an error code describing
-        the cause of Local-networked Service connectivity failure.
+        request fails then the Web page will receive a promise-based error callback containing an error string
+        describing the cause of Local-networked Service connectivity failure.
       </p>
       <p>
         Once connected to a Local-networked Service the Web page can send requests and receive responses to the
@@ -189,7 +189,7 @@
 }
 
 function error( e ) {
-  console.log( "Error occurred: " + e.code );
+  console.log( "Error occurred: " + e.name );
 }
 
 navigator.getNetworkServices('upnp:urn:schemas-upnp-org:service:ContentDirectory:1').then(showServices, error);
@@ -397,17 +397,11 @@
      href="http://dom.spec.whatwg.org/#promise">Promise</a> <a href=
      "#dom-navigator-getnetworkservices">getNetworkServices</a>( in any type );
 };
+
 <a class="externalDFN"
      href=
      "http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href=
      "#navigatornetworkservice">NavigatorNetworkService</a>;
-
-[NoInterfaceObject]
-interface <dfn id="navigatornetworkserviceerror">NavigatorNetworkServiceError</dfn> {
-  const unsigned short <a href="#dom-navigatornetworkserviceerror-permission_denied">PERMISSION_DENIED_ERR</a> = 1;
-  const unsigned short <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix">UNKNOWN_TYPE_PREFIX_ERR</a> = 2;
-  readonly attribute unsigned short <a href="#dom-navigatornetworkserviceerror-code">code</a>;
-};
 </pre>
       <section>
         <h2>
@@ -472,12 +466,12 @@
             below. Otherwise, reject <var>Network Service Promise</var> by running the <a href=
             "http://dom.spec.whatwg.org/#concept-resolver-reject"
                   class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
-                  Resolver</var>, passing in a new <a href=
-                  "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
-                  "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
-                  (<a href=
-                  "#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as
-                  its argument, abort any remaining steps and return.
+                  Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
+                  class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the string
+                  value "UnknownTypePrefixError" (<a href=
+                  "#dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) and whose
+                  <code>message</code> attribute has a helpful implementation-dependent message that explains this
+                  error, abort any remaining steps and return.
             </li>
             <li>
               <em>Process</em>: Let <var>services found</var> be an empty array.
@@ -509,12 +503,12 @@
             platform limitations, the <a>user agent</a> MAY reject <var>Network Service Promise</var> by running the
             <a href="http://dom.spec.whatwg.org/#concept-resolver-reject"
                   class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
-                  Resolver</var>, passing in a new <a href=
-                  "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
-                  "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
-                  (<a href=
-                  "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
-                  argument, abort any remaining steps and return.
+                  Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
+                  class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the string
+                  value "PermissionDeniedError" (<a href=
+                  "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) and whose
+                  <code>message</code> attribute has a helpful implementation-dependent message that explains this
+                  error, abort any remaining steps and return.
             </li>
             <li>The user agent MUST NOT provide the entry script's origin with a <a href=
             "#networkservices"><code>NetworkServices</code></a> object without prior permission given by the user.
@@ -543,12 +537,12 @@
                 MUST reject <var>Network Service Promise</var> by running the <a href=
                 "http://dom.spec.whatwg.org/#concept-resolver-reject"
                    class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
-                   Resolver</var>, passing in a new <a href=
-                   "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href=
-                   "#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
-                   (<a href=
-                   "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
-                   argument, abort any remaining steps and return.
+                   Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
+                   class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the
+                   string value "PermissionDeniedError" (<a href=
+                   "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) and whose
+                   <code>message</code> attribute has a helpful implementation-dependent message that explains this
+                   error, abort any remaining steps and return.
               </p>
               <p>
                 If the user never responds or no previously-established user preference has been met, this algorithm
@@ -656,38 +650,38 @@
         </h3>
         <dl class="domintro">
           <dt>
-            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-code"><a href=
-            "#dom-navigatornetworkserviceerror-code">code</a></code>
+            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-name"><a href=
+            "#dom-domerror-extensions-name">name</a></code>
           </dt>
           <dd>
             <p>
-              Returns the current error's error code. At the current time, this will be <code>1</code> or
-              <code>2</code>, for which the corresponding error constants <a href=
-              "#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href=
-              "#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are
-              defined.
+              Returns the current error's error name. At the current time, this will be "PermissionDeniedError" or
+              "UnknownTypePrefixError", for which the corresponding error constants <a href=
+              "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href=
+              "#dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are defined.
             </p>
           </dd>
         </dl>
         <p>
-          The <dfn id="dom-navigatornetworkserviceerror-code"
-             title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a <a href=
-             "#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class=
-             "ct">MUST</em> return the code for the error, which will be one of the following:
+          The <dfn id="dom-domerror-extensions-name"
+             title="dom-domerror-extensions-name"><code>name</code></dfn> attribute of a <a href=
+             "http://dom.spec.whatwg.org/#domerror"
+             class="externalDFN"><code>DOMError</code></a> object returned from this API <em class="ct">MUST</em>
+             return the name for the error, which will be one of the following:
         </p>
         <dl>
           <dt>
-            <dfn id="dom-navigatornetworkserviceerror-permission_denied"
-                title="dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn>
-                (numeric value 1)
+            <dfn id="dom-domerror-extensions-permission_denied"
+                title="dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn> (DOMString
+                value "PermissionDeniedError")
           </dt>
           <dd>
             The user or user agent denied the page permission to access any services.
           </dd>
           <dt>
-            <dfn id="dom-navigatornetworkserviceerror-unknown_type_prefix"
-                title="dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
-                (numeric value 2)
+            <dfn id="dom-domerror-extensions-unknown_type_prefix"
+                title="dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
+                (DOMString value "UnknownTypePrefixError")
           </dt>
           <dd>
             No <a>valid service type</a> tokens were provided in the method invocation.
@@ -2091,7 +2085,7 @@
   }
 
   function errorCallback( error ) {
-    debug.innerHTML += "&lt;br&gt;An error occurred: " + error.code;
+    debug.innerHTML += "&lt;br&gt;An error occurred: " + error.name;
   }
 &lt;/script&gt;
 </pre>