discovery-api/Overview.html
author Rich Tibbett <richt@opera.com>
Mon, 07 Oct 2013 14:07:57 +1100
changeset 480 f3ea6558ffe1
parent 453 07345c55f11f
child 483 140b6c8d4c18
permissions -rw-r--r--
Add CORS as the primary network service opt-in mechanism for the NSD API specification
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
     1
<!DOCTYPE html>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     2
<html lang="en"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     3
      dir="ltr"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     4
      typeof="bibo:Document"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     5
      about=""
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     6
      property="dcterms:language"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     7
      content="en">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
     8
  <head>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
     9
    <title>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
    10
      Network Service Discovery
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
    11
    </title>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    12
    <meta http-equiv="Content-Type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    13
          content="text/html; charset=utf-8">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    14
    <style>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    15
/* Custom ReSpec CSS (by Rich Tibbett) */
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    16
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    17
     /* Add better spacing to sections */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    18
     section, .section { margin-bottom: 2em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    19
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    20
     /* Add addition spacing to <ol> and <ul> for rule definition */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    21
     ol.rule li, ul.rule li { padding:0.6em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    22
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    23
     pre.widl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    24
     pre.widl :link, pre.widl :visited { color: #000; background: transparent; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    25
     pre.widl:before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    26
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    27
     div.example { border: solid thin black; background: #FFFFF0; color: black; padding: 0.5em 1em; position: relative; margin: 1em 0 1em 4.6em; width: auto; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    28
     div.example:before { content: "EXAMPLE"; font: bold small sans-serif; padding: 0.5em; background: white; color: black; position: absolute; top: 0; margin: -1px 0 0 -7.6em; width: 5em; border: thin solid black; border-radius: 0 0 0 0.5em }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    29
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    30
     dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    31
     hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    32
     dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    33
     dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    34
     dl.domintro dd p { margin: 0.5em 0; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    35
     dl.domintro code {font-size: inherit; font-style: italic; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    36
     dl.domintro:before { display: table; margin: -1em -0.5em 0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: red; border: solid 2px; background: white; padding: 0 0.25em; font-size:0.8em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    37
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    38
     table { border-collapse:collapse; border-style:hidden hidden none hidden }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    39
     table thead { border-bottom:solid }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    40
     table tbody th:first-child { border-left:solid }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    41
     table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    42
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    43
    <style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    44
/*****************************************************************
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    45
    * ReSpec 3 CSS
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    46
    * Robin Berjon - http://berjon.com/
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    47
    *****************************************************************/
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    48
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    49
    /* --- INLINES --- */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    50
    em.rfc2119 {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    51
    text-transform:     lowercase;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    52
    font-variant:       small-caps;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    53
    font-style:         normal;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    54
    color:              #900;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    55
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    56
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    57
    h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    58
    h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    59
    border: none;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    60
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    61
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    62
    dfn {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    63
    font-weight:    bold;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    64
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    65
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    66
    a.internalDFN {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    67
    color:  inherit;
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    68
    border-bottom:  1px solid #99c;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    69
    text-decoration:    none;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    70
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    71
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    72
    a.externalDFN {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    73
    color:  inherit;
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    74
    border-bottom:  1px dotted #ccc;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    75
    text-decoration:    none;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    76
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    77
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    78
    a.bibref {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    79
    text-decoration:    none;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    80
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    81
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    82
    cite .bibref {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    83
    font-style: normal;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    84
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    85
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    86
    code {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    87
    color:  #ff4500;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    88
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    89
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    90
    /* --- TOC --- */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    91
    .toc a, .tof a {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    92
    text-decoration:    none;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    93
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    94
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    95
    a .secno, a .figno {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    96
    color:  #000;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    97
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    98
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
    99
    ul.tof, ol.tof {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   100
    list-style: none outside none;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   101
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   102
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   103
    .caption {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   104
    margin-top: 0.5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   105
    font-style:   italic;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   106
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   107
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   108
    /* --- TABLE --- */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   109
    table.simple {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   110
    border-spacing: 0;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   111
    border-collapse:    collapse;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   112
    border-bottom:  3px solid #005a9c;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   113
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   114
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   115
    .simple th {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   116
    background: #005a9c;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   117
    color:  #fff;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   118
    padding:    3px 5px;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   119
    text-align: left;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   120
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   121
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   122
    .simple th[scope="row"] {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   123
    background: inherit;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   124
    color:  inherit;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   125
    border-top: 1px solid #ddd;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   126
    }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   127
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   128
    .simple td {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   129
    padding:    3px 10px;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   130
    border-top: 1px solid #ddd;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   131
    }
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   132
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   133
    .simple tr:nth-child(even) {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   134
    background: #f0f6ff;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   135
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   136
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   137
    /* --- DL --- */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   138
    .section dd > p:first-child {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   139
    margin-top: 0;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   140
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   141
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   142
    .section dd > p:last-child {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   143
    margin-bottom: 0;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   144
    }
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   145
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   146
    .section dd {
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   147
    margin-bottom:  1em;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   148
    }
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   149
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   150
    .section dl.attrs dd, .section dl.eldef dd {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   151
    margin-bottom:  0;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   152
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   153
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   154
    <style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   155
/* --- ISSUES/NOTES --- */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   156
    div.issue-title, div.note-title {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   157
    padding-right:  1em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   158
    min-width: 7.5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   159
    color: #b9ab2d;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   160
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   161
    div.issue-title { color: #e05252; }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   162
    div.note-title { color: #2b2; }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   163
    div.issue-title span, div.note-title span {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   164
    text-transform: uppercase;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   165
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   166
    div.note, div.issue {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   167
    margin-top: 1em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   168
    margin-bottom: 1em;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   169
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   170
    .note > p:first-child, .issue > p:first-child { margin-top: 0 }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   171
    .issue, .note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   172
    padding: .5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   173
    border-left-width: .5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   174
    border-left-style: solid;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   175
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   176
    div.issue, div.note {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   177
    padding: 1em 1.2em 0.5em;
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   178
    margin: 1em 0;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   179
    position: relative;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   180
    clear: both;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   181
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   182
    span.note, span.issue { padding: .1em .5em .15em; }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   183
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   184
    .issue {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   185
    border-color: #e05252;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   186
    background: #fbe9e9;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   187
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   188
    .note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   189
    border-color: #52e052;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   190
    background: #e9fbe9;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   191
    }
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   192
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   193
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   194
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   195
    <style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   196
/* HIGHLIGHTS */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   197
    code.prettyprint {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   198
    color:  inherit;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   199
    }
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   200
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   201
    /* this from google-code-prettify */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   202
    .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   203
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   204
    <link rel="stylesheet"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   205
          href="https://www.w3.org/StyleSheets/TR/W3C-ED">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   206
  </head>
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   207
  <body class="h-entry"
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   208
        style=""
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   209
        role="document"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   210
        id="respecDocument">
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   211
    <div class="head"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   212
         role="contentinfo"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   213
         id="respecHeader">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   214
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   215
        <a href="http://www.w3.org/"><img width="72"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   216
             height="48"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   217
             src="https://www.w3.org/Icons/w3c_home"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   218
             alt="W3C"></a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   219
      </p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   220
      <h1 class="title p-name"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   221
          id="title"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   222
          property="dcterms:title">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   223
        Network Service Discovery
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   224
      </h1>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   225
      <h2 property="dcterms:issued"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   226
          datatype="xsd:dateTime"
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   227
          content="2013-10-06T16:06:07.000Z"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   228
          id="w3c-editor-s-draft-07-october-2013">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   229
        <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published"
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   230
            datetime="2013-10-07">07 October 2013</time>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   231
      </h2>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   232
      <dl>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   233
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   234
          This version:
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   235
        </dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   236
        <dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   237
          <a class="u-url"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   238
              href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   239
              "http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   240
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   241
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   242
          Latest published version:
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   243
        </dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   244
        <dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   245
          <a href="http://www.w3.org/TR/discovery-api/">http://www.w3.org/TR/discovery-api/</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   246
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   247
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   248
          Latest editor's draft:
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   249
        </dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   250
        <dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   251
          <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   252
          "http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   253
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   254
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   255
          Editor:
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   256
        </dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   257
        <dd class="p-author h-card vcard"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   258
            rel="bibo:editor"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   259
            inlist="">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   260
          <span typeof="foaf:Person"><span property="foaf:name"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   261
                class="p-name fn">Rich Tibbett</span>, <a rel="foaf:workplaceHomepage"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   262
             class="p-org org h-org h-card"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   263
             href="http://opera.com/">Opera Software ASA</a></span>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   264
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   265
      </dl>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   266
      <p class="copyright">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   267
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2013 <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   268
        "http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   269
        "http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   270
        "http://www.ercim.eu/"><abbr title=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   271
        "European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   272
        "http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   273
        <abbr title="World Wide Web Consortium">W3C</abbr> <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   274
        "http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   275
        "http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   276
        "http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   277
      </p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   278
      <hr>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   279
    </div>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   280
    <section id="abstract"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   281
             class="introductory"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   282
             property="dcterms:abstract"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   283
             datatype=""
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   284
             typeof="bibo:Chapter"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   285
             resource="#abstract"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   286
             rel="bibo:chapter">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   287
      <h2 aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   288
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   289
          id="h2_abstract">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   290
        Abstract
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   291
      </h2>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   292
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   293
        This specification defines a mechanism for an HTML document to discover and subsequently communicate with
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   294
        <abbr title="Hypertext Transfer Protocol">HTTP</abbr>-based services advertised via common discovery protocols
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   295
        within the current network.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   296
      </p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   297
    </section>
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   298
    <section id="sotd"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   299
             class="introductory"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   300
             typeof="bibo:Chapter"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   301
             resource="#sotd"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   302
             rel="bibo:chapter">
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   303
      <h2 aria-level="1"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   304
          role="heading"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   305
          id="h2_sotd">
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   306
        Status of This Document
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   307
      </h2>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   308
      <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   309
        <em>This section describes the status of this document at the time of its publication. Other documents may
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   310
        supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   311
        the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   312
        "World Wide Web Consortium">W3C</abbr> technical reports index</a> at http://www.w3.org/TR/.</em>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   313
      </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   314
      <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   315
        This document represents the early consensus of the group on the scope and features of the proposed
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   316
        <abbr title="Application Programming Interface">API</abbr>.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   317
      </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   318
      <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   319
        This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as an
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   320
        Editor's Draft. If you wish to make comments regarding this document, please send them to <a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   321
        "mailto:public-device-apis@w3.org">public-device-apis@w3.org</a> (<a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   322
        "mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>, <a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   323
        "http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>). All comments are welcome.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   324
      </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   325
      <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   326
        Publication as an Editor's Draft does not imply endorsement by the <abbr title=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   327
        "World Wide Web Consortium">W3C</abbr> Membership. This is a draft document and may be updated, replaced or
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   328
        obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   329
        progress.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   330
      </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   331
      <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   332
        This document was produced by a group operating under the <a id="sotd_patent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   333
           about=""
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   334
           rel="w3p:patentRules"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   335
           href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   336
           "World Wide Web Consortium">W3C</abbr> Patent Policy</a>. <abbr title="World Wide Web Consortium">W3C</abbr>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   337
           maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   338
           rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   339
           group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   340
           of a patent which the individual believes contains <a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   341
           "http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   342
           the information in accordance with <a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   343
           "http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <abbr title=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   344
           "World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   345
      </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   346
    </section>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   347
    <section id="toc">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   348
      <h2 class="introductory"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   349
          aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   350
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   351
          id="h2_toc">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   352
        Table of Contents
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   353
      </h2>
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   354
      <ul class="toc"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   355
          role="directory"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   356
          id="respecContents">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   357
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   358
          <a href="#introduction"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   359
              class="tocxref"><span class="secno">1.</span> Introduction</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   360
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   361
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   362
          <a href="#conformance"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   363
              class="tocxref"><span class="secno">2.</span> Conformance</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   364
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   365
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   366
              <a href="#dependencies"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   367
                  class="tocxref"><span class="secno">2.1</span> Dependencies</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   368
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   369
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   370
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   371
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   372
          <a href="#terminology"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   373
              class="tocxref"><span class="secno">3.</span> Terminology</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   374
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   375
        <li class="tocline">
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   376
          <a href="#security-and-privacy-considerations"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   377
              class="tocxref"><span class="secno">4.</span> Security and privacy considerations</a>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   378
          <ul class="toc">
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   379
            <li class="tocline">
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   380
              <a href="#security-considerations-for-api-implementations"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   381
                  class="tocxref"><span class="secno">4.1</span> Security considerations for <abbr title=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   382
                  "Application Programming Interface">API</abbr> implementations</a>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   383
            </li>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   384
            <li class="tocline">
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   385
              <a href="#privacy-considerations-for-api-implementations"
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   386
                  class="tocxref"><span class="secno">4.2</span> Privacy considerations for <abbr title=
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   387
                  "Application Programming Interface">API</abbr> implementations</a>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   388
            </li>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   389
            <li class="tocline">
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   390
              <a href="#additional-api-implementation-considerations"
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   391
                  class="tocxref"><span class="secno">4.3</span> Additional <abbr title=
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   392
                  "Application Programming Interface">API</abbr> implementation considerations</a>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   393
            </li>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   394
          </ul>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   395
        </li>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   396
        <li class="tocline">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   397
          <a href="#requesting-networked-services"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   398
              class="tocxref"><span class="secno">5.</span> Requesting networked services</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   399
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   400
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   401
              <a href="#methods"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   402
                  class="tocxref"><span class="secno">5.1</span> Methods</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   403
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   404
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   405
              <a href="#error-handling"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   406
                  class="tocxref"><span class="secno">5.2</span> Error Handling</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   407
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   408
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   409
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   410
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   411
          <a href="#obtaining-networked-services"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   412
              class="tocxref"><span class="secno">6.</span> Obtaining networked services</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   413
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   414
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   415
              <a href="#attributes"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   416
                  class="tocxref"><span class="secno">6.1</span> Attributes</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   417
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   418
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   419
              <a href="#methods-1"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   420
                  class="tocxref"><span class="secno">6.2</span> Methods</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   421
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   422
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   423
              <a href="#events"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   424
                  class="tocxref"><span class="secno">6.3</span> Events</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   425
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   426
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   427
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   428
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   429
          <a href="#communicating-with-a-networked-service"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   430
              class="tocxref"><span class="secno">7.</span> Communicating with a networked service</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   431
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   432
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   433
              <a href="#attributes-1"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   434
                  class="tocxref"><span class="secno">7.1</span> Attributes</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   435
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   436
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   437
              <a href="#states"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   438
                  class="tocxref"><span class="secno">7.2</span> States</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   439
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   440
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   441
              <a href="#events-1"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   442
                  class="tocxref"><span class="secno">7.3</span> Events</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   443
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   444
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   445
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   446
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   447
          <a href="#service-discovery"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   448
              class="tocxref"><span class="secno">8.</span> Service Discovery</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   449
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   450
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   451
              <a href="#zeroconf-mdns-dns-sd"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   452
                  class="tocxref"><span class="secno">8.1</span> Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> +
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   453
                  <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   454
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   455
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   456
              <a href="#simple-service-discovery-protocol-ssdp"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   457
                  class="tocxref"><span class="secno">8.2</span> Simple Service Discovery Protocol (<abbr title=
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   458
                  "Simple Service Discovery Protocol">SSDP</abbr>)</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   459
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   460
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   461
              <a href="#discovery-and-launch-protocol-dial"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   462
                  class="tocxref"><span class="secno">8.3</span> Discovery and Launch Protocol (<abbr title=
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   463
                  "Discovery and Launch Protocol">DIAL</abbr>)</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   464
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   465
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   466
              <a href="#network-topology-monitoring"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   467
                  class="tocxref"><span class="secno">8.4</span> Network Topology Monitoring</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   468
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   469
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   470
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   471
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   472
          <a href="#events-summary"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   473
              class="tocxref"><span class="secno">9.</span> Events Summary</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   474
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   475
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   476
          <a href="#garbage-collection"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   477
              class="tocxref"><span class="secno">10.</span> Garbage collection</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   478
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   479
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   480
          <a href="#use-cases-and-requirements"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   481
              class="tocxref"><span class="secno">11.</span> Use Cases and Requirements</a>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   482
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   483
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   484
          <a href="#examples"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   485
              class="tocxref"><span class="secno">A.</span> Examples</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   486
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   487
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   488
          <a href="#acknowledgements"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   489
              class="tocxref"><span class="secno">B.</span> Acknowledgements</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   490
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   491
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   492
          <a href="#references"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   493
              class="tocxref"><span class="secno">C.</span> References</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   494
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   495
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   496
              <a href="#normative-references"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   497
                  class="tocxref"><span class="secno">C.1</span> Normative references</a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   498
            </li>
453
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   499
            <li class="tocline">
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   500
              <a href="#informative-references"
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   501
                  class="tocxref"><span class="secno">C.2</span> Informative references</a>
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   502
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   503
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   504
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   505
      </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   506
    </section>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   507
    <section class="informative"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   508
             id="introduction">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   509
      <h2 aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   510
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   511
          id="h2_introduction">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   512
        <span class="secno">1.</span> Introduction
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   513
      </h2>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   514
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   515
        <em>This section is non-normative.</em>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   516
      </p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   517
      <p>
453
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   518
        This specification defines the <a href="#navigatornetworkservice"><code>NavigatorNetworkService</code></a>
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   519
        interface to enable Web pages to connect and communicate with Local-networked Services provided over
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   520
        <abbr title="Hypertext Transfer Protocol">HTTP</abbr>. This enables access to services and content provided by
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   521
        home network devices, including the discovery and playback of content available to those devices, both from
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   522
        services such as traditional broadcast media and internet based services as well as local services. Initial
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   523
        design goals and requirements provided by the <a href="http://www.w3.org/2011/webtv/"><abbr title=
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   524
        "World Wide Web Consortium">W3C</abbr> Web &amp; TV interest group</a> are documented in [<cite><a class=
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   525
        "bibref"
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   526
           href="#bib-hnreq">hnreq</a></cite>].
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   527
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   528
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   529
        Using this <abbr title="Application Programming Interface">API</abbr> consists of requesting a well-known
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   530
        service type, known by developers and advertised by Local-networked Devices. User authorization, where the user
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   531
        connects the web page to discovered services, is expected before the web page is able to interact with any
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   532
        Local-networked Services.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   533
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   534
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   535
        A web page creates a request to obtain connectivity to services running in the network by specifying a
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   536
        well-known discovery service type that it wishes to interact with.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   537
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   538
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   539
        The user agent, having captured all advertised services on the network from the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   540
        "#dfn-service-discovery-mechanisms"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   541
           class="internalDFN">service discovery mechanisms</a> included in this recommendation, attempts to match the
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   542
           requested service type to a discovered service according to the processing described herein. Only
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   543
           Local-networked Services that pass a <a href="#dfn-cors-preflight-check"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   544
           class="internalDFN">CORS preflight check</a> should be made available to web pages by a user agent. A user
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   545
           agent may provide a way for users to white-list non-CORS enabled Local-networked Services but implementation
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   546
           of such a feature is left to the discretion of the implementer.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   547
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   548
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   549
        If a service connectivity request is successful then the Web page is provided with a promise-based success
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   550
        callback with the all necessary information to communicate with the authorized Local-networked Service. If the
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   551
        request fails then the Web page will receive a promise-based error callback containing an error string
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   552
        describing the cause of Local-networked Service connectivity failure.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   553
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   554
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   555
        Once connected to a Local-networked Service the Web page can send requests and receive responses to the
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   556
        Local-networked Service via the messaging format and appropriate channel inferred from the service type
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   557
        authorized via the provided <abbr title="Application Programming Interface">API</abbr>. The Web page, once
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   558
        connected, can also receive service-pushed events, in the messaging format supported by the Local-networked
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   559
        Device, if such event subscription functionality is provided by the connected Local-networked Service.
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   560
      </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   561
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   562
        Services available within the local network can connect and disconnect at different times during the execution
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   563
        of a web page. The user agent can inform a web page when the state of networked services matching any of the
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   564
        requested valid service types change. Web pages can use this information to enable in-page experiences for
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   565
        communicating the state of networked services with the ability to change the particular service or set of
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   566
        services the page is connected to (by re-invoking the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   567
        "#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method defined herein).
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   568
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   569
      <div class="example">
191
5e0da09685f7 Discovery API updates following feedback from http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0016.html
Rich Tibbett <richt@opera.com>
parents: 180
diff changeset
   570
        <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   571
          Example of requesting a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   572
          advertised service:
191
5e0da09685f7 Discovery API updates following feedback from http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0016.html
Rich Tibbett <richt@opera.com>
parents: 180
diff changeset
   573
        </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   574
        <hr>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   575
        <pre class="highlight prettyprint">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   576
<span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   577
"pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   578
  </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   579
  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   580
"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   581
"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   582
"pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   583
"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   584
"pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   585
"pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   586
"pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   587
</span><span class="pun">}</span><span class="pln">
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   588
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   589
navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   590
"pun">(</span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">).</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   591
"kwd">then</span><span class="pun">(</span><span class="pln">showServices</span><span class="pun">);</span>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   592
</pre>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   593
      </div>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   594
      <div class="example">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   595
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   596
          Example of requesting a UPnP advertised service, also handling error conditions:
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   597
        </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   598
        <hr>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   599
        <pre class="highlight prettyprint">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   600
<span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   601
"pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   602
  </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   603
  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   604
"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   605
"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   606
"pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   607
"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   608
"pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   609
"pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   610
"pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   611
</span><span class="pun">}</span><span class="pln">
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   612
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   613
</span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   614
"pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   615
  console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   616
"pln"> </span><span class="str">"Error occurred: "</span><span class="pln"> </span><span class=
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   617
"pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">name </span><span class=
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   618
"pun">);</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   619
</span><span class="pun">}</span><span class="pln">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   620
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   621
navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   622
"pun">(</span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   623
"pun">).</span><span class="kwd">then</span><span class="pun">(</span><span class="pln">showServices</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   624
"pun">,</span><span class="pln"> error</span><span class="pun">);</span>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   625
</pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   626
      </div>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   627
      <div class="example">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   628
        <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   629
          Example of requesting either a <abbr title="Domain Name System">DNS</abbr>-<abbr title=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   630
          "Service Discovery">SD</abbr> or UPnP advertised service:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   631
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   632
        <hr>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   633
        <pre class="highlight prettyprint">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   634
<span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   635
"pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   636
  </span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   637
"com">// Show a list of all the services provided to the web page (+ service type)</span><span class="pln">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   638
  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   639
"pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   640
"pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   641
"pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   642
"pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   643
"pun">++)</span><span class="pln">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   644
     console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   645
"pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   646
"pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">'('</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   647
"pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   648
"pln">i</span><span class="pun">].</span><span class="pln">type </span><span class="pun">+</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   649
"pln"> </span><span class="str">')'</span><span class="pln"> </span><span class="pun">);</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   650
</span><span class="pun">}</span><span class="pln">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   651
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   652
navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   653
"pun">([</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   654
  </span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln">
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   655
  </span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pln">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   656
</span><span class="pun">]).</span><span class="kwd">then</span><span class="pun">(</span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   657
"pln">showServices</span><span class="pun">);</span>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   658
</pre>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   659
      </div>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   660
      <p>
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   661
        For more detailed examples, including examples of communicating with obtained networked services, see the
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   662
        <a href="#examples">Examples</a> section.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   663
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   664
    </section>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   665
    <section id="conformance"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   666
             typeof="bibo:Chapter"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   667
             resource="#conformance"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   668
             rel="bibo:chapter">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   669
      <h2 aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   670
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   671
          id="h2_conformance">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   672
        <span class="secno">2.</span> Conformance
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   673
      </h2>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   674
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   675
        As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   676
        specification are non-normative. Everything else in this specification is normative.
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   677
      </p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   678
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   679
        The key words <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   680
           title="MUST">MUST</em>, <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   681
           title="MUST NOT">MUST NOT</em>, <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   682
           title="REQUIRED">REQUIRED</em>, <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   683
           title="SHOULD">SHOULD</em>, <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   684
           title="SHOULD NOT">SHOULD NOT</em>, <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   685
           title="RECOMMENDED">RECOMMENDED</em>, <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   686
           title="MAY">MAY</em>, and <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   687
           title="OPTIONAL">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   688
           "bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   689
           href="#bib-RFC2119">RFC2119</a></cite>].
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   690
      </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   691
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   692
        Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   693
        "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should",
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   694
        "may", etc) used in introducing the algorithm.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   695
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   696
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   697
        Some conformance requirements are phrased as requirements on attributes, methods or objects. Such requirements
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   698
        are to be interpreted as requirements on user agents.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   699
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   700
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   701
        Conformance requirements phrased as algorithms or specific steps <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   702
           title="MAY">MAY</em> be implemented in any manner, so long as the end result is equivalent. (In particular,
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   703
           the algorithms defined in this specification are intended to be easy to follow, and not intended to be
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   704
           performant.)
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   705
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   706
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   707
        The only conformance class defined by this specification is a <dfn id="dfn-user-agent">user agent</dfn>.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   708
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   709
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   710
        User agents <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   711
           title="MAY">MAY</em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   712
           prevent denial of service attacks, to guard against running out of memory, or to work around
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   713
           platform-specific limitations.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   714
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   715
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   716
        When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   717
        in development, or for performance reasons), user agents <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   718
           title="MUST">MUST</em> act as if they had no support for the feature whatsoever, and as if the feature was
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   719
           not mentioned in this specification. For example, if a particular feature is accessed via an attribute in a
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   720
           Web IDL interface, the attribute itself would be omitted from the objects that implement that interface -
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   721
           leaving the attribute on the object but making it return null or throw an exception is insufficient.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   722
      </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   723
      <section id="dependencies">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   724
        <h3 aria-level="2"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   725
            role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   726
            id="h3_dependencies">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   727
          <span class="secno">2.1</span> Dependencies
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   728
        </h3>This specification relies on several other underlying specifications.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   729
        <dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   730
          <dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   731
            HTML
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   732
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   733
          <dd>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   734
            Many fundamental concepts from HTML are used by this specification. [<cite><a class="bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   735
               href="#bib-HTML5">HTML5</a></cite>]
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   736
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   737
          <dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   738
            WebIDL
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   739
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   740
          <dd>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   741
            The IDL blocks in this specification use the semantics of the WebIDL specification. [<cite><a class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   742
            "bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   743
               href="#bib-WEBIDL">WEBIDL</a></cite>]
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   744
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   745
        </dl>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   746
      </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   747
    </section>
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   748
    <section id="terminology">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   749
      <h2 aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   750
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   751
          id="h2_terminology">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   752
        <span class="secno">3.</span> Terminology
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   753
      </h2>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   754
      <p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   755
        The construction "a <code>Foo</code> object", where <code>Foo</code> is actually an interface, is sometimes
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   756
        used instead of the more accurate "an object implementing the interface <code>Foo</code>".
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   757
      </p>
230
3c13dc93cfb1 Re-write of Section 7: Service Discovery according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0017.html
Rich Tibbett <richt@opera.com>
parents: 216
diff changeset
   758
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   759
        The term DOM is used to refer to the <abbr title="Application Programming Interface">API</abbr> set made
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   760
        available to scripts in Web applications, and does not necessarily imply the existence of an actual
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   761
        <code>Document</code> object or of any other <code>Node</code> objects as defined in the DOM Core
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   762
        specifications. [<cite><a class="bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   763
           href="#bib-DOM4">DOM4</a></cite>]
230
3c13dc93cfb1 Re-write of Section 7: Service Discovery according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0017.html
Rich Tibbett <richt@opera.com>
parents: 216
diff changeset
   764
      </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   765
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   766
        An IDL attribute is said to be <em>getting</em> when its value is being retrieved (e.g. by author script), and
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   767
        is said to be <em>setting</em> when a new value is assigned to it.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   768
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   769
      <p>
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   770
        A <dfn id="dfn-valid-service-type">valid service type</dfn> is any of the following:
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   771
      </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   772
      <ul>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   773
        <li>a string that begins with <code>upnp:</code> or <code>zeroconf:</code> followed by one or more characters
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   774
        in the ranges U+0021, U+0023 to U+0027, U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041 to U+005A,
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   775
        U+005E to U+007E.
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   776
        </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   777
        <li>a string that begins with <code>dial:</code> followed by an integer version.
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   778
        </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   779
      </ul>
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   780
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   781
        A <a href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   782
           class="internalDFN">valid service type</a> provided in the <code>type</code> attribute of the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   783
           "#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method will be matched against the
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   784
           services currently contained in the <a href="#dfn-list-of-available-service-records"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   785
           class="internalDFN">list of available service records</a> according to the algorithms defined in this
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   786
           specification.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   787
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   788
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   789
        A <dfn id="dfn-user-agent-generated-callback-url">user-agent generated callback url</dfn> is a Local-network
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   790
        accessible URL endpoint that a <a href="#dfn-user-agent"
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   791
           class="internalDFN">user agent</a> generates and maintains for receiving <abbr title=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   792
           "Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only required when
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   793
           the user agent implements UPnP Service Discovery as defined in this specification.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   794
      </p>
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   795
      <p>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   796
        In this specification we use the following terms to describe the processes required for Local-networked
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   797
        Services management:
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   798
      </p>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   799
      <ul>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   800
        <li>A <dfn id="dfn-new-service">new service</dfn> is a Local-networked Service that has not previously been
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   801
        discovered or registered in the <a href="#dfn-list-of-available-service-records"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   802
              class="internalDFN">list of available service records</a>.
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   803
        </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   804
        <li>An <dfn id="dfn-existing-service">existing service</dfn> is a Local-networked Service that has previously
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   805
        been discovered and is registered in the <a href="#dfn-list-of-available-service-records"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   806
              class="internalDFN">list of available service records</a>.
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   807
        </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   808
        <li>A <dfn id="dfn-current-service">current service</dfn> is a Local-networked Service, represented by a
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   809
        <a href="#networkservice"><code>NetworkService</code></a> object, that is currently being shared with a web
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   810
        page via a <a href="#networkservices"><code>NetworkServices</code></a> object registered in the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   811
        "#dfn-list-of-active-service-managers"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   812
              class="internalDFN">list of active service managers</a>.
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   813
        </li>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   814
      </ul>
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   815
      <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   816
        A <dfn id="dfn-network-services-whitelist">network services whitelist</dfn> is a list of zero or more <a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   817
        "#dfn-valid-service-type"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   818
           class="internalDFN">valid service type</a> tokens that, when matched to a service type discovered in the
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   819
           local network, enables that service to be shared with a web page even if that Local-networked Service does
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   820
           not itself allow Cross-Origin Resource Sharing [<cite><a class="bibref"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   821
           href="#bib-CORS">CORS</a></cite>]. A <a href="#dfn-user-agent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   822
           class="internalDFN">user agent</a> <em class="rfc2119"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   823
           title="MUST">MUST</em> simulate CORS support for all service interaction in this case. Implementation of
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   824
           this feature is at implementer's discretion. When a <a href="#dfn-user-agent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   825
           class="internalDFN">user agent</a> does not implement a <a href="#dfn-network-services-whitelist"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   826
           class="internalDFN">network services whitelist</a> then it is to treat this as always being an empty list.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   827
      </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   828
    </section>
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   829
    <section id="security-and-privacy-considerations">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   830
      <h2 aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   831
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   832
          id="h2_security-and-privacy-considerations">
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   833
        <span class="secno">4.</span> Security and privacy considerations
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   834
      </h2>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   835
      <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   836
        The <abbr title="Application Programming Interface">API</abbr> defined in this specification can be used to
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   837
        find and connect to devices and services within a user's current network. This discloses information related to
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   838
        a user's network: devices available on their network and the publicly-accessible services ("networked
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   839
        services") currently running and available on those devices. The distribution of this information could
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   840
        potentially compromise the user's privacy. A conforming implementation of this specification <em class=
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   841
        "rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   842
           title="MUST">MUST</em> provide a mechanism that protects the user's privacy. This mechanism <em class=
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   843
           "rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   844
           title="MUST">MUST</em> ensure that no networked service information is retrievable without the user's
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   845
           express permission.
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   846
      </p>
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   847
      <section id="security-considerations-for-api-implementations">
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   848
        <h3 aria-level="2"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   849
            role="heading"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   850
            id="h3_security-considerations-for-api-implementations">
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   851
          <span class="secno">4.1</span> Security considerations for <abbr title=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   852
          "Application Programming Interface">API</abbr> implementations
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   853
        </h3>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   854
        <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   855
          A <a href="#dfn-user-agent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   856
             class="internalDFN">user agent</a> <em class="rfc2119"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   857
             title="MUST">MUST</em> allow web pages to connect only with Local-networked Services that have passed a
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   858
             <a href="#dfn-cors-preflight-check"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   859
             class="internalDFN">CORS preflight check</a> indicating they support Cross-Origin Resource Sharing
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   860
             [<cite><a class="bibref"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   861
             href="#bib-CORS">CORS</a></cite>] during the <a href="#dfn-service-discovery-mechanisms"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   862
             class="internalDFN">service discovery mechanisms</a> provided in this specification. In this way, a
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   863
             <a href="#dfn-user-agent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   864
             class="internalDFN">user agent</a> <em class="rfc2119"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   865
             title="MUST NOT">MUST NOT</em> allow web pages to access other arbitrary networked services on the current
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   866
             local network.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   867
        </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   868
        <p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   869
          A <a href="#dfn-user-agent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   870
             class="internalDFN">user agent</a> <em class="rfc2119"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   871
             title="MAY">MAY</em> provide a way for users to enable access to non-CORS enabled Local-networked Services
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   872
             from web pages (i.e. operate a <a href="#dfn-network-services-whitelist"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   873
             class="internalDFN">network services whitelist</a>). Implementation of such a <a href=
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   874
             "#dfn-network-services-whitelist"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   875
             class="internalDFN">network services whitelist</a>, if any, is left to an implementer's discretion. Such a
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   876
             whitelist may be configurable by each user at runtime or may be managed by the implementation itself on
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   877
             behalf of its users. In the case that a <a href="#dfn-user-agent"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   878
             class="internalDFN">user agent</a> provides a <a href="#dfn-network-services-whitelist"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   879
             class="internalDFN">network services whitelist</a>, it <em class="rfc2119"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   880
             title="MUST">MUST</em> act as if all URLs for the Local-networked Service corresponding to any previously
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   881
             whitelisted service type had Cross-Origin Resource Sharing [<cite><a class="bibref"
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   882
             href="#bib-CORS">CORS</a></cite>] enabled indefinitely.
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   883
        </p>
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   884
      </section>
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   885
      <section id="privacy-considerations-for-api-implementations">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   886
        <h3 aria-level="2"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   887
            role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   888
            id="h3_privacy-considerations-for-api-implementations">
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   889
          <span class="secno">4.2</span> Privacy considerations for <abbr title=
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   890
          "Application Programming Interface">API</abbr> implementations
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   891
        </h3>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   892
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   893
          A <a href="#dfn-user-agent"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   894
             class="internalDFN">user agent</a> <em class="rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   895
             title="MUST NOT">MUST NOT</em> provide networked service information to web sites without the express
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   896
             permission of the user. A user agent <em class="rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   897
             title="MUST">MUST</em> acquire permission through a user interface, unless they have prearranged trust
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   898
             relationships with users, as described below. The user interface <em class="rfc2119"
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   899
             title="MUST">MUST</em> include the document base URL. Those permissions that are acquired through the user
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   900
             interface and that are preserved beyond the current browsing session (i.e. beyond the time when the
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   901
             browsing context is navigated to another URL) <em class="rfc2119"
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   902
             title="MUST">MUST</em> be revocable and a user agent <em class="rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   903
             title="MUST">MUST</em> respect revoked permissions.
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   904
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   905
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   906
          Obtaining the user's express permission to access one <abbr title=
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   907
          "Application Programming Interface">API</abbr> method does not imply the user has granted permission for the
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   908
          same web site to access any other methods that may be provided by this <abbr title=
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   909
          "Application Programming Interface">API</abbr>, or to access the same method with a different set of
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   910
          arguments, as part of the same permission context. If a user has expressed permission for an implementation
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   911
          to, e.g. find a set of existing networked services, the implementation <em class="rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   912
             title="MUST">MUST</em> seek the user's express permission if and when any subsequent functions are called
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   913
             on this <abbr title="Application Programming Interface">API</abbr>.
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   914
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   915
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   916
          A user agent <em class="rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   917
             title="MAY">MAY</em> have prearranged trust relationships that do not require such user interfaces. For
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   918
             example, while a web browser will present a user interface when a web site performs a networked service
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   919
             lookup, a different runtime may have a prearranged, delegated security relationship with the user and, as
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   920
             such, a suitable alternative security and privacy mechanism with which to authorise the retrieval of
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   921
             networked service information.
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   922
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   923
      </section>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   924
      <section class="informative"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   925
               id="additional-api-implementation-considerations">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   926
        <h3 aria-level="2"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   927
            role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   928
            id="h3_additional-api-implementation-considerations">
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   929
          <span class="secno">4.3</span> Additional <abbr title="Application Programming Interface">API</abbr>
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   930
          implementation considerations
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   931
        </h3>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   932
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   933
          <em>This section is non-normative.</em>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   934
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   935
        <p>
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   936
          Further to the requirements listed in the previous section, implementers of the Network Service Discovery
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   937
          <abbr title="Application Programming Interface">API</abbr> are also advised to consider the following aspects
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   938
          that can negatively affect the privacy of their users: in certain cases, users can inadvertently grant
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   939
          permission to the user agent to disclose networked services to Web sites. In other cases, the content hosted
480
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   940
          at a certain URL changes in such a way that previously granted networked service permissions no longer apply
f3ea6558ffe1 Add CORS as the primary network service opt-in mechanism for the NSD API specification
Rich Tibbett <richt@opera.com>
parents: 453
diff changeset
   941
          as far as the user is concerned. Or the users might simply change their minds.
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   942
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   943
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   944
          Predicting or preventing these situations is inherently difficult. Mitigation and in-depth defensive measures
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   945
          are an implementation responsibility and not prescribed by this specification. However, in designing these
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   946
          measures, implementers are advised to enable user awareness of networked service sharing, and to provide easy
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   947
          access to interfaces that enable revocation of permissions that web applications have for accessing networked
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   948
          services via this <abbr title="Application Programming Interface">API</abbr>.
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   949
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   950
      </section>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   951
    </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   952
    <section id="requesting-networked-services">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   953
      <h2 aria-level="1"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   954
          role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   955
          id="h2_requesting-networked-services">
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   956
        <span class="secno">5.</span> Requesting networked services
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   957
      </h2>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   958
      <pre class="widl">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   959
[Supplemental, NoInterfaceObject]
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   960
interface <dfn id="navigatornetworkservice">NavigatorNetworkService</dfn> {
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   961
  <a class="externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   962
     href="http://dom.spec.whatwg.org/#promise">Promise</a> <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   963
     "#dom-navigator-getnetworkservices">getNetworkServices</a>( in any type );
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   964
};
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   965
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   966
<a class="externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   967
     href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   968
     "http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   969
     "#navigatornetworkservice">NavigatorNetworkService</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   970
</pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   971
      <section id="methods">
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   972
        <h3 aria-level="2"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   973
            role="heading"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
   974
            id="h3_methods">
440
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   975
          <span class="secno">5.1</span> Methods
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   976
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   977
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   978
          <dt>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   979
            <var title="">promise</var> = <var title="">window</var> . <code title="dom-navigator"><a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   980
            "http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">navigator</a></code> .
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   981
            <code title="dom-navigator-getNetworkServices"><a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   982
            "#dom-navigator-getnetworkservices">getNetworkServices</a></code> ( <var title="">type</var> )
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   983
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   984
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   985
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   986
              Immediately returns a new <a href="http://dom.spec.whatwg.org/#promise"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   987
                 class="externalDFN">Promise</a> object and then the user is prompted to select discovered network
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   988
                 services that have advertised support for the requested service type(s).
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   989
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   990
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   991
              The <var title="">type</var> argument contains one or more <a href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   992
                 class="internalDFN">valid service type</a> tokens that the web page would like to interact with.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   993
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   994
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   995
              If the user accepts, the <var title="">promise</var> object is <a class="externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   996
                 href="http://dom.spec.whatwg.org/#concept-resolver-resolve">resolved</a>, with a <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   997
                 "#networkservices"><code>NetworkServices</code></a> object as its argument.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   998
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   999
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1000
              If the user declines, or an error occurs, the <var title="">promise</var> object is <a class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1001
              "externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1002
                 href="http://dom.spec.whatwg.org/#concept-resolver-reject">rejected</a>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1003
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1004
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1005
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1006
        <div>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1007
          <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1008
            When the <dfn id="dom-navigator-getnetworkservices"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1009
               title="dom-navigator-getnetworkservices"><code>getNetworkServices(type)</code></dfn> method is called,
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1010
               the <a href="#dfn-user-agent"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1011
               class="internalDFN">user agent</a> <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1012
               title="MUST">MUST</em> run the following steps:
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1013
          </p>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1014
          <ol class="rule">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1015
            <li>Let <var>Network Service Promise</var> be a new <a href="http://dom.spec.whatwg.org/#promise"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1016
                  class="externalDFN"><code>Promise</code></a> object.
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1017
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1018
            <li>Let <var>Network Service Promise's Resolver</var> be the default <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1019
            "http://dom.spec.whatwg.org/#concept-resolver"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1020
                  class="externalDFN">resolver</a> of <var>Network Service Promise</var>.
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1021
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1022
            <li>Return <var>Network Service Promise</var>, and run the remaining steps asynchronously.
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1023
            </li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1024
            <li>Let <var>requested control types</var> be initially set to an empty array.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1025
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1026
            <li>If <var>type</var> is an array consisting of one or more <a href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1027
                  class="internalDFN">valid service type</a> tokens, then let <var>requested control types</var> by the
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1028
                  value of <var>type</var>, removing any non-<a href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1029
                  class="internalDFN">valid service type</a> tokens from the resulting array.
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
  1030
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1031
            <li>If <var>type</var> is a string consisting of one <a href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1032
                  class="internalDFN">valid service type</a> token, then let <var>requested control types</var> be an
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1033
                  array containing one item with a value of <var>type</var>.
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1034
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1035
            <li>If <var>requested control types</var> is an array that contains at least one or more <a title=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1036
            "valid service type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1037
                  href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1038
                  class="internalDFN">valid service type</a> tokens then continue to the step labeled <em>process</em>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1039
                  below. Otherwise, reject <var>Network Service Promise</var> by running the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1040
                  "http://dom.spec.whatwg.org/#concept-resolver-reject"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1041
                  class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1042
                  Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1043
                  class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the string
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1044
                  value "UnknownTypePrefixError" (<a href=
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1045
                  "#dom-domerror-extensions-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) and whose
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1046
                  <code>message</code> attribute has a helpful implementation-dependent message that explains this
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1047
                  error, abort any remaining steps and return.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1048
            </li>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1049
            <li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1050
              <em>Process</em>: Let <var>services found</var> be an empty array.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1051
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1052
            <li>For each <var>available service</var> in the <a href="#dfn-list-of-available-service-records"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1053
                  class="internalDFN">list of available service records</a> run the following steps:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1054
              <ol class="rule">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1055
                <li>For each <var>requested control type</var> in <var>requested control types</var>: If <var>available
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1056
                service</var>'s <code>type</code> attribute equals the <var>requested control type</var> then let <var>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1057
                  matched service</var> equal the value of <var>available service</var> and continue at the step
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1058
                  labeled <var>attach</var> below.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1059
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1060
                <li>Continue at the next <var>available service</var>.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1061
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1062
                <li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1063
                  <em>Attach</em>: If <var>matched service</var> is not empty then run the following steps:
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1064
                  <ol class="rule">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1065
                    <li>Let <var>new service object</var> be a new <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1066
                    "#networkservice"><code>NetworkService</code></a> object, mapping the parameters of <var>matched
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1067
                    service</var> to this new object where possible.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1068
                    </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1069
                    <li>Append <var>new service object</var> to the <var>services found</var> array.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1070
                    </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1071
                  </ol>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1072
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1073
              </ol>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1074
            </li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1075
            <li>Optionally, e.g. based on a previously-established user preference, for security reasons, or due to
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1076
            platform limitations, the <a href="#dfn-user-agent"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1077
                  class="internalDFN">user agent</a> <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1078
                  title="MAY">MAY</em> reject <var>Network Service Promise</var> by running the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1079
                  "http://dom.spec.whatwg.org/#concept-resolver-reject"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1080
                  class="externalDFN">resolver reject algorithm</a> against the <var>Network Service Promise's
447
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1081
                  Resolver</var>, passing in a newly constructed <a href="http://dom.spec.whatwg.org/#domerror"
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1082
                  class="externalDFN"><code>DOMError</code></a> object whose <code>name</code> attribute has the string
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1083
                  value "PermissionDeniedError" (<a href=
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1084
                  "#dom-domerror-extensions-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) and whose
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1085
                  <code>message</code> attribute has a helpful implementation-dependent message that explains this
5e36d90b8960 Replace numeric error codes with string-based error types and fold the NavigatorNetworkServiceError interface in to DOMError (therefore, removing NavigatorNetworkServiceError from spec)
Rich Tibbett <richt@opera.com>
parents: 441
diff changeset
  1086
                  error, abort any remaining steps and return.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1087
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1088
            <li>The user agent <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1089
                  title="MUST NOT">MUST NOT</em> provide the entry script's origin with a <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1090
                  "#networkservices"><code>NetworkServices</code></a> object without prior permission given by the
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1091
                  user.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1092
              <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1093
                If <var>services found</var> is not an empty array then the <a href="#dfn-user-agent"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1094
                   class="internalDFN">user agent</a> <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1095
                   title="MAY">MAY</em> choose to prompt the user in a user-agent-specific manner for permission to
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1096
                   provide the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1097
                   "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1098
                   class="externalDFN">entry script</a>'s <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1099
                   "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1100
                   class="externalDFN">origin</a> with a <a href="#networkservices"><code>NetworkServices</code></a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1101
                   object representing the <a href="#dfn-user-authorized"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1102
                   class="internalDFN">user-authorized</a> subset of <var>services found</var>.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1103
              </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1104
              <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1105
                Alternatively, the user agent <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1106
                   title="MAY">MAY</em> wish to skip this user opt-in step and choose to fulfill <var>Network Service
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1107
                   Promise</var> immediately based on a previously-established user preference, for security reasons,
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1108
                   or due to platform limitations. In such an implementation, if <var>Network Service Promise</var> is
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1109
                   to be fulfilled as a result of a previously-established user preference then the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1110
                   "#dfn-user-agent"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1111
                   class="internalDFN">user agent</a> <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1112
                   title="MUST">MUST</em> continue at the next step of this algorithm.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
  1113
              </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
  1114
              <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1115
                If permission has been granted by the user to access one or more networked services then the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1116
                "#dfn-user-agent"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1117
                   class="internalDFN">user agent</a> <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1118
                   title="SHOULD">SHOULD</em> include an "ongoing local-network communication" indicator.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
  1119
              </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@ope