discovery-api/Overview.html
author Rich Tibbett <richt@opera.com>
Tue, 18 Feb 2014 14:24:48 +0100
changeset 492 2f37e8af951a
parent 484 608edb43c84d
child 594 ffb713303c21
permissions -rw-r--r--
Update working version to latest respec build
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 --- */
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
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
    }
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   153
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   154
    @media print {
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   155
    .removeOnSave {
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   156
        display: none;
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   157
    }
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   158
    }
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   159
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   160
    <style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   161
/* --- ISSUES/NOTES --- */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   162
    div.issue-title, div.note-title {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   163
    padding-right:  1em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   164
    min-width: 7.5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   165
    color: #b9ab2d;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   166
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   167
    div.issue-title { color: #e05252; }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   168
    div.note-title { color: #2b2; }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   169
    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
   170
    text-transform: uppercase;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   171
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   172
    div.note, div.issue {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   173
    margin-top: 1em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   174
    margin-bottom: 1em;
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
    .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
   177
    .issue, .note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   178
    padding: .5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   179
    border-left-width: .5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   180
    border-left-style: solid;
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
    div.issue, div.note {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   183
    padding: 1em 1.2em 0.5em;
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   184
    margin: 1em 0;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   185
    position: relative;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   186
    clear: both;
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
    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
   189
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   190
    .issue {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   191
    border-color: #e05252;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   192
    background: #fbe9e9;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   193
    }
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   194
    .note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   195
    border-color: #52e052;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   196
    background: #e9fbe9;
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   197
    }
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   198
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   199
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   200
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   201
    <style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   202
/* HIGHLIGHTS */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   203
    code.prettyprint {
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   204
    color:  inherit;
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   205
    }
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   206
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   207
    /* this from google-code-prettify */
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   208
    .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
   209
    </style>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   210
    <link rel="stylesheet"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   211
          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
   212
  </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
   213
  <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
   214
        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
   215
        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
   216
        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
   217
    <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
   218
         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
   219
         id="respecHeader">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   220
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   221
        <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
   222
             height="48"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   223
             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
   224
             alt="W3C"></a>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   225
      </p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   226
      <h1 class="title p-name"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   227
          id="title"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   228
          property="dcterms:title">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   229
        Network Service Discovery
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   230
      </h1>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   231
      <h2 property="dcterms:issued"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   232
          datatype="xsd:dateTime"
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   233
          content="2014-02-18T12:22:23.000Z"
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   234
          id="w3c-editor-s-draft-18-february-2014">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   235
        <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published"
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   236
            datetime="2014-02-18">18 February 2014</time>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   237
      </h2>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   238
      <dl>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   239
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   240
          This version:
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
        <dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   243
          <a class="u-url"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   244
              href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   245
              "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
   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 published version:
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="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
   252
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   253
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   254
          Latest editor's draft:
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   255
        </dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   256
        <dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   257
          <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   258
          "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
   259
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   260
        <dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   261
          Editor:
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   262
        </dt>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   263
        <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
   264
            rel="bibo:editor"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   265
            inlist="">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   266
          <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
   267
                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
   268
             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
   269
             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
   270
        </dd>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   271
      </dl>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   272
      <p class="copyright">
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   273
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2014 <a href=
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   274
        "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
   275
        "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
   276
        "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
   277
        "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
   278
        "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
   279
        <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
   280
        "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
   281
        "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
   282
        "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
   283
      </p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   284
      <hr>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   285
    </div>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   286
    <section id="abstract"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   287
             class="introductory"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   288
             property="dcterms:abstract"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   289
             datatype=""
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   290
             typeof="bibo:Chapter"
484
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
   291
             resource="#ref"
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
   292
             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
   293
      <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
   294
          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
   295
          id="h2_abstract">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   296
        Abstract
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   297
      </h2>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   298
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   299
        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
   300
        <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
   301
        within the current network.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   302
      </p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   303
    </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
   304
    <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
   305
             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
   306
             typeof="bibo:Chapter"
484
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
   307
             resource="#ref"
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
   308
             rel="bibo:Chapter">
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
   309
      <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
   310
          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
   311
          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
   312
        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
   313
      </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
   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
        <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
   316
        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
   317
        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
   318
        "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
   319
      </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
   320
      <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
   321
        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
   322
        <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
   323
      </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
   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
        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
   326
        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
   327
        "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
   328
        "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
   329
        "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
   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
        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
   333
        "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
   334
        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
   335
        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
   336
      </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
   337
      <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
   338
        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
   339
           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
   340
           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
   341
           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
   342
           "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
   343
           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
   344
           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
   345
           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
   346
           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
   347
           "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
   348
           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
   349
           "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
   350
           "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
   351
      </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
   352
    </section>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   353
    <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
   354
      <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
   355
          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
   356
          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
   357
          id="h2_toc">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   358
        Table of Contents
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   359
      </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
   360
      <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
   361
          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
   362
          id="respecContents">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   363
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   364
          <a href="#introduction"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   365
              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
   366
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   367
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   368
          <a href="#conformance"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   369
              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
   370
          <ul class="toc">
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="#dependencies"
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">2.1</span> Dependencies</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
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   376
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   377
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   378
          <a href="#terminology"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   379
              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
   380
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   381
        <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
   382
          <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
   383
              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
   384
          <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
   385
            <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
   386
              <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
   387
                  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
   388
                  "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
   389
            </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
   390
            <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
   391
              <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
   392
                  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
   393
                  "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
   394
            </li>
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 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
   396
              <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
   397
                  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
   398
                  "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
   399
            </li>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   400
          </ul>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   401
        </li>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   402
        <li class="tocline">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   403
          <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
   404
              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
   405
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   406
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   407
              <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
   408
                  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
   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="#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
   412
                  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
   413
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   414
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   415
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   416
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   417
          <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
   418
              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
   419
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   420
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   421
              <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
   422
                  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
   423
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   424
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   425
              <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
   426
                  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
   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="#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
   430
                  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
   431
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   432
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   433
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   434
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   435
          <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
   436
              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
   437
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   438
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   439
              <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
   440
                  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
   441
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   442
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   443
              <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
   444
                  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
   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="#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
   448
                  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
   449
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   450
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   451
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   452
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   453
          <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
   454
              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
   455
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   456
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   457
              <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
   458
                  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
   459
                  <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
   460
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   461
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   462
              <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
   463
                  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
   464
                  "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
   465
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   466
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   467
              <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
   468
                  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
   469
                  "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
   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="#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
   473
                  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
   474
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   475
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   476
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   477
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   478
          <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
   479
              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
   480
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   481
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   482
          <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
   483
              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
   484
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   485
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   486
          <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
   487
              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
   488
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   489
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   490
          <a href="#examples"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   491
              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
   492
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   493
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   494
          <a href="#acknowledgements"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   495
              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
   496
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   497
        <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   498
          <a href="#references"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   499
              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
   500
          <ul class="toc">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   501
            <li class="tocline">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   502
              <a href="#normative-references"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   503
                  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
   504
            </li>
453
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   505
            <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
   506
              <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
   507
                  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
   508
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   509
          </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   510
        </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   511
      </ul>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   512
    </section>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   513
    <section class="informative"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   514
             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
   515
      <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
   516
          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
   517
          id="h2_introduction">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   518
        <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
   519
      </h2>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   520
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   521
        <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
   522
      </p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   523
      <p>
453
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   524
        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
   525
        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
   526
        <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
   527
        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
   528
        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
   529
        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
   530
        "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
   531
        "bibref"
07345c55f11f Fix [DAP-ISSUE-147]: Reference 'Requirements for Home Networking Scenarios' in Introduction
Rich Tibbett <richt@opera.com>
parents: 448
diff changeset
   532
           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
   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
        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
   536
        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
   537
        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
   538
        Local-networked Services.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   539
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   540
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   541
        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
   542
        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
   543
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   544
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   545
        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
   546
        "#dfn-service-discovery-mechanisms"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   547
           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
   548
           requested service type to a discovered service according to the processing described herein. Only
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   549
           Local-networked Services that pass a <a href="#dfn-preliminary-cors-check"
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   550
           class="internalDFN">preliminary CORS check</a> should be made available to web pages by a user agent. A user
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
   551
           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
   552
           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
   553
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   554
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   555
        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
   556
        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
   557
        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
   558
        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
   559
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   560
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   561
        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
   562
        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
   563
        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
   564
        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
   565
        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
   566
      </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   567
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   568
        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
   569
        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
   570
        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
   571
        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
   572
        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
   573
        "#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
   574
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   575
      <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
   576
        <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   577
          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
   578
          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
   579
        </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   580
        <hr>
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   581
        <pre class="highlight prettyprint prettyprinted"
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   582
             style="">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   583
<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
   584
"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
   585
  </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
   586
  </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
   587
"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
   588
"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
   589
"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
   590
"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
   591
"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
   592
"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
   593
"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
   594
</span><span class="pun">}</span><span class="pln">
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   595
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   596
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
   597
"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
   598
"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
   599
</pre>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   600
      </div>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   601
      <div class="example">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   602
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   603
          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
   604
        </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   605
        <hr>
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   606
        <pre class="highlight prettyprint prettyprinted"
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   607
             style="">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   608
<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
   609
"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
   610
  </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
   611
  </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
   612
"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
   613
"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
   614
"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
   615
"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
   616
"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
   617
"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
   618
"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
   619
</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
   620
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   621
</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
   622
"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
   623
  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
   624
"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
   625
"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
   626
"pun">);</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   627
</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
   628
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   629
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
   630
"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
   631
"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
   632
"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
   633
</pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   634
      </div>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   635
      <div class="example">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   636
        <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   637
          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
   638
          "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
   639
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   640
        <hr>
492
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   641
        <pre class="highlight prettyprint prettyprinted"
2f37e8af951a Update working version to latest respec build
Rich Tibbett <richt@opera.com>
parents: 484
diff changeset
   642
             style="">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   643
<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
   644
"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
   645
  </span><span class=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   646
"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
   647
  </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
   648
"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
   649
"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
   650
"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
   651
"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
   652
"pun">++)</span><span class="pln">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   653
     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
   654
"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
   655
"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
   656
"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
   657
"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
   658
"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
   659
</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
   660
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   661
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
   662
"pun">([</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   663
  </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
   664
  </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
   665
</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
   666
"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
   667
</pre>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   668
      </div>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   669
      <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
   670
        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
   671
        <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
   672
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   673
    </section>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   674
    <section id="conformance"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   675
             typeof="bibo:Chapter"
484
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
   676
             resource="#ref"
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
   677
             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
   678
      <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
   679
          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
   680
          id="h2_conformance">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   681
        <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
   682
      </h2>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   683
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   684
        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
   685
        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
   686
      </p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   687
      <p>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   688
        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
   689
           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
   690
           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
   691
           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
   692
           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
   693
           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
   694
           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
   695
           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
   696
           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
   697
           "bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   698
           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
   699
      </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   700
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   701
        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
   702
        "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
   703
        "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
   704
      </p>
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
        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
   707
        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
   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
        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
   711
           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
   712
           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
   713
           performant.)
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
        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
   717
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   718
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   719
        User agents <em class="rfc2119"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   720
           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
   721
           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
   722
           platform-specific limitations.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   723
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   724
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   725
        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
   726
        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
   727
           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
   728
           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
   729
           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
   730
           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
   731
      </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   732
      <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
   733
        <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
   734
            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
   735
            id="h3_dependencies">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   736
          <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
   737
        </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
   738
        <dl>
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
            HTML
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   741
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   742
          <dd>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   743
            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
   744
               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
   745
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   746
          <dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   747
            WebIDL
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   748
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   749
          <dd>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   750
            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
   751
            "bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   752
               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
   753
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   754
        </dl>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   755
      </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   756
    </section>
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   757
    <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
   758
      <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
   759
          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
   760
          id="h2_terminology">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   761
        <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
   762
      </h2>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   763
      <p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   764
        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
   765
        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
   766
      </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
   767
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   768
        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
   769
        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
   770
        <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
   771
        specifications. [<cite><a class="bibref"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   772
           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
   773
      </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   774
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   775
        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
   776
        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
   777
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   778
      <p>
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   779
        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
   780
      </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   781
      <ul>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   782
        <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
   783
        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
   784
        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
   785
        </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   786
        <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
   787
        </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   788
      </ul>
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   789
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   790
        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
   791
           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
   792
           "#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
   793
           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
   794
           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
   795
           specification.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   796
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   797
      <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   798
        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
   799
        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
   800
           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
   801
           "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
   802
           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
   803
      </p>
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   804
      <p>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   805
        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
   806
        Services management:
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   807
      </p>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   808
      <ul>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   809
        <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
   810
        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
   811
              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
   812
        </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   813
        <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
   814
        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
   815
              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
   816
        </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   817
        <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
   818
        <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
   819
        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
   820
        "#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
   821
              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
   822
        </li>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   823
      </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
   824
      <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
   825
        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
   826
        "#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
   827
           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
   828
           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
   829
           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
   830
           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
   831
           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
   832
           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
   833
           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
   834
           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
   835
           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
   836
      </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   837
    </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
   838
    <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
   839
      <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
   840
          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
   841
          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
   842
        <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
   843
      </h2>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   844
      <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   845
        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
   846
        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
   847
        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
   848
        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
   849
        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
   850
        "rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   851
           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
   852
           "rfc2119"
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   853
           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
   854
           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
   855
      </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
   856
      <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
   857
        <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
   858
            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
   859
            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
   860
          <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
   861
          "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
   862
        </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
   863
        <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
   864
          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
   865
             class="internalDFN">user agent</a> <em class="rfc2119"
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   866
             title="SHOULD">SHOULD</em> only allow web pages to connect with Local-networked Services that have passed
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   867
             a <a href="#dfn-preliminary-cors-check"
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   868
             class="internalDFN">preliminary CORS check</a> indicating they support Cross-Origin Resource Sharing
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
   869
             [<cite><a class="bibref"
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   870
             href="#bib-CORS">CORS</a></cite>]. In this way, a <a href="#dfn-user-agent"
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
   871
             class="internalDFN">user agent</a> <em class="rfc2119"
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   872
             title="SHOULD NOT">SHOULD NOT</em> allow web pages to access other arbitrary networked services on the
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
   873
             current 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
   874
        </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
   875
        <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
   876
          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
   877
             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
   878
             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
   879
             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
   880
             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
   881
             "#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
   882
             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
   883
             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
   884
             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
   885
             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
   886
             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
   887
             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
   888
             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
   889
             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
   890
        </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
   891
      </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
   892
      <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
   893
        <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
   894
            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
   895
            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
   896
          <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
   897
          "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
   898
        </h3>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   899
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   900
          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
   901
             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
   902
             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
   903
             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
   904
             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
   905
             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
   906
             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
   907
             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
   908
             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
   909
             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
   910
             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
   911
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   912
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   913
          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
   914
          "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
   915
          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
   916
          "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
   917
          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
   918
          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
   919
             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
   920
             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
   921
        </p>
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
          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
   924
             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
   925
             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
   926
             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
   927
             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
   928
             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
   929
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   930
      </section>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   931
      <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
   932
               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
   933
        <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
   934
            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
   935
            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
   936
          <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
   937
          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
   938
        </h3>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   939
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   940
          <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
   941
        </p>
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>
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
   943
          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
   944
          <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
   945
          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
   946
          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
   947
          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
   948
          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
   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
        <p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   951
          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
   952
          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
   953
          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
   954
          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
   955
          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
   956
        </p>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   957
      </section>
fcbaadc4fd54 Fix [DAP-ISSUE-135]: Add security and privacy considerations section [Network Service Discovery]
Rich Tibbett <richt@opera.com>
parents: 438
diff changeset
   958
    </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   959
    <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
   960
      <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
   961
          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
   962
          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
   963
        <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
   964
      </h2>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   965
      <pre class="widl">
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   966
[Supplemental, NoInterfaceObject]
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   967
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
   968
  <a class="externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   969
     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
   970
     "#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
   971
};
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
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   973
<a class="externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   974
     href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   975
     "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
   976
     "#navigatornetworkservice">NavigatorNetworkService</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   977
</pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   978
      <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
   979
        <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
   980
            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
   981
            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
   982
          <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
   983
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   984
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   985
          <dt>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   986
            <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
   987
            "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
   988
            <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
   989
            "#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
   990
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   991
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   992
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   993
              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
   994
                 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
   995
                 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
   996
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   997
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
   998
              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
   999
                 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
  1000
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1001
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1002
              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
  1003
                 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
  1004
                 "#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
  1005
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1006
            <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1007
              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
  1008
              "externalDFN"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1009
                 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
  1010
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1011
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1012
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1013
        <div>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1014
          <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1015
            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
  1016
               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
  1017
               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
  1018
               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
  1019
               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
  1020
          </p>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1021
          <ol class="rule">
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1022
            <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
  1023
                  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
  1024
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1025
            <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
  1026
            "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
  1027
                  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
  1028
            </li>
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1029
            <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
  1030
            </li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1031
            <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
  1032
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1033
            <li>If <var>type</var> is an array consisting of one or more <a href="#dfn-valid-service-type"
484
608edb43c84d Fix minor respec link bugs and other minor editorials
Rich Tibbett <richt@opera.com>
parents: 483
diff changeset
  1034
                  class="internalDFN">valid service type</a> tokens, then let <var>requested control types</var> be the
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1035
                  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
  1036
                  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
  1037
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1038
            <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
  1039
                  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
  1040
                  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
  1041
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1042
            <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
  1043
            "valid service type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1044
                  href="#dfn-valid-service-type"
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1045
                  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
  1046
                  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
  1047
                  "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
  1048
                  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
  1049
                  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
  1050
                  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
  1051
                  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
  1052
                  "#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
  1053
                  <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
  1054
                  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
  1055
            </li>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1056
            <li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1057
              <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
  1058
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1059
            <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
  1060
                  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
  1061
              <ol class="rule">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1062
                <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
  1063
                service</var>'s <code>type</code> attribute equals the <var>requested control type</var> then let <var>
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1064
                  matched service</var> equal the value of <var>available service</var>. Otherwise, abort the remaining
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1065
                  sub-steps and continue above at the next <var>available service</var>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1066
                </li>
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1067
                <li>If <var>matched service</var> is not empty then run the following steps:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1068
                  <ol class="rule">
483
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1069
                    <li>Let <var>CORS check result</var> be the result of running the <a href=
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1070
                    "#dfn-preliminary-cors-check"
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1071
                          class="internalDFN">preliminary CORS check</a> algorithm, passing in <var>matched
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1072
                          services</var>'s <code>url</code> attribute as the <var>control endpoint URL</var> argument
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1073
                          and the <a href=
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1074
                          "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1075
                          class="externalDFN">entry script</a>'s <a href=
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1076
                          "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1077
                          class="externalDFN">origin</a> as the <var>request origin</var> argument.
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1078
                    </li>
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1079
                    <li>If <var>CORS check result</var> is not <code>pass</code> and <var>matched service</var>'s
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1080
                    <code>type</code> attribute is also not present in the <a href="#dfn-network-services-whitelist"
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1081
                          class="internalDFN">network services whitelist</a> then abort the remaining sub-steps and
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1082
                          continue above at the next <var>available service</var>.
140b6c8d4c18 [discovery-api] Re-write CORS-related parts of the spec following subsequent feedback on http://lists.w3.org/Archives/Public/public-device-apis/2013Oct/0049.html
Rich Tibbett <richt@opera.com>
parents: 480
diff changeset
  1083
                    </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1084
                    <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
  1085
                    "#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
  1086
                    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
  1087
                    </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1088
                    <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
  1089
                    </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1090
                  </ol>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1091
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1092
              </ol>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1093
            </li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1094
            <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
  1095
            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
  1096
                  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
  1097
                  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
  1098
                  "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
  1099
                  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
  1100
                  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
  1101
                  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
  1102
                  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
  1103
                  "#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
  1104
                  <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
  1105
                  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
  1106
            </li>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1107
            <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
  1108
                  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
  1109
                  "#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
  1110
                  user.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1111
              <p>
437
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1112
                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
  1113
                   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
  1114
                   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
  1115
                   provide the <a href=
d25229263a68 Change getNetworkServices API + associated algorithms to use DOM Promises
Rich Tibbett <richt@opera.com>
parents: 402
diff changeset
  1116
                   "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
  1117
                   class="externalDFN">entry script</a>'s <a href=