Skip to content

Commit b0e4def

Browse files
committed
Align with origin changes in HTML
Fixes #102. (And should clarify things for #21.)
1 parent e322a8a commit b0e4def

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

url.bs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,8 +2094,8 @@ background information. [[!HTML]]
20942094
<p>Let <var>url</var> be the result of <a lt="basic URL parser">parsing</a> the first
20952095
string in <a for=url>URL</a>'s <a for=url>path</a>.
20962096

2097-
<p>If <var>url</var> is failure, return a new globally unique identifier. Otherwise,
2098-
return <var>url</var>'s <a for=url>origin</a>.
2097+
<p>Return a new <a>opaque origin</a>, if <var>url</var> is failure, and <var>url</var>'s
2098+
<a for=url>origin</a> otherwise.
20992099
<!-- Did you mean: recursion -->
21002100

21012101
<p class="example no-backref">The <a for=url>origin</a> of
@@ -2108,17 +2108,16 @@ background information. [[!HTML]]
21082108
<dt>"<code>https</code>"
21092109
<dt>"<code>ws</code>"
21102110
<dt>"<code>wss</code>"
2111-
<dd><p>Return a tuple consisting of <a for=url>URL</a>'s <a for=url>scheme</a>, its
2112-
<a for=url>host</a>, and its <a>default port</a> if its <a for=url>port</a> is null, and
2113-
its <a for=url>port</a> otherwise.
2111+
<dd><p>Return a tuple consisting of <a for=url>URL</a>'s <a for=url>scheme</a>,
2112+
<a for=url>URL</a>'s <a for=url>host</a>, <a for=url>URL</a>'s <a for=url>port</a>, and null.
21142113

21152114
<dt>"<code>file</code>"
21162115
<dd><p>Unfortunate as it is, this is left as an exercise to the reader. When in doubt,
2117-
return a new globally unique identifier.
2116+
return a new <a>opaque origin</a>.
21182117

21192118
<dt>Otherwise
21202119
<dd>
2121-
<p>Return a new globally unique identifier.
2120+
<p>Return a new <a>opaque origin</a>.
21222121

21232122
<p class="note no-backref">This does indeed mean that these <a for=url lt=URL>URLs</a> cannot
21242123
be <a spec=html lt="same origin">same-origin</a> with themselves.

url.html

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<head>
33
<meta charset="utf-8">
44
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
5+
<meta content="#3c790a" name="theme-color">
56
<title>URL Standard</title>
67
<link href="https://resources.whatwg.org/standard.css" rel="stylesheet">
78
<link href="https://resources.whatwg.org/bikeshed.css" rel="stylesheet">
@@ -10,8 +11,10 @@
1011
<body class="h-entry status-LS">
1112
<div class="head">
1213
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-url.svg"> </a> </p>
13-
<h1 class="p-name no-ref allcaps" id="title">URL</h1>
14-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-03-30">30 March 2016</time></span></h2>
14+
<hgroup>
15+
<h1 class="p-name no-ref allcaps" id="title">URL</h1>
16+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-04-05">5 April 2016</time></span></h2>
17+
</hgroup>
1518
<div data-fill-with="spec-metadata">
1619
<dl>
1720
<dt>Participate:
@@ -28,7 +31,6 @@ <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="cont
2831
<div class="p-summary" data-fill-with="abstract">
2932
<p>The URL Standard defines URLs, domains, IP addresses, the <code title="">application/x-www-form-urlencoded</code> format, and their API.</p>
3033
</div>
31-
<div data-fill-with="at-risk"></div>
3234
<nav data-fill-with="table-of-contents" id="toc">
3335
<h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
3436
<ol class="toc" role="directory">
@@ -1526,16 +1528,15 @@ <h3 class="heading settled" data-level="4.4" id="url-equivalence"><span class="s
15261528
otherwise. </p>
15271529
</ol>
15281530
<h3 class="heading settled" data-level="4.5" id="origin"><span class="secno">4.5. </span><span class="content">Origin</span><a class="self-link" href="#origin"></a></h3>
1529-
<p class="note" role="note">See <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#origin-2">origin</a>’s definition in HTML for the necessary
1531+
<p class="note" role="note">See <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origin</a>’s definition in HTML for the necessary
15301532
background information. <a data-link-type="biblio" href="#biblio-html">[HTML]</a> </p>
1531-
<p>A <a data-link-type="dfn" href="#concept-url">URL</a>’s <dfn data-dfn-for="url" data-dfn-type="dfn" data-export="" id="concept-url-origin">origin<a class="self-link" href="#concept-url-origin"></a></dfn> is the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#origin-2">origin</a> returned by running these steps, switching on <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-scheme">scheme</a>: </p>
1533+
<p>A <a data-link-type="dfn" href="#concept-url">URL</a>’s <dfn data-dfn-for="url" data-dfn-type="dfn" data-export="" id="concept-url-origin">origin<a class="self-link" href="#concept-url-origin"></a></dfn> is the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origin</a> returned by running these steps, switching on <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-scheme">scheme</a>: </p>
15321534
<dl class="switch">
15331535
<dt>"<code>blob</code>"
15341536
<dd>
15351537
<p>Let <var>url</var> be the result of <a data-link-type="dfn" href="#concept-basic-url-parser">parsing</a> the first
15361538
string in <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-path">path</a>. </p>
1537-
<p>If <var>url</var> is failure, return a new globally unique identifier. Otherwise,
1538-
return <var>url</var>’s <a data-link-type="dfn" href="#concept-url-origin">origin</a>. </p>
1539+
<p>Return a new <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin-opaque">opaque origin</a>, if <var>url</var> is failure, and <var>url</var>’s <a data-link-type="dfn" href="#concept-url-origin">origin</a> otherwise. </p>
15391540
<p class="example no-backref" id="example-f4c8ee39"><a class="self-link" href="#example-f4c8ee39"></a>The <a data-link-type="dfn" href="#concept-url-origin">origin</a> of <code>blob:https://whatwg.org/d0360e2f-caee-469f-9a2f-87d5b0456f6f</code> is the tuple
15401541
(<code>https</code>, <code>whatwg.org</code>, <code>443</code>). </p>
15411542
<dt>"<code>ftp</code>"
@@ -1545,15 +1546,14 @@ <h3 class="heading settled" data-level="4.5" id="origin"><span class="secno">4.5
15451546
<dt>"<code>ws</code>"
15461547
<dt>"<code>wss</code>"
15471548
<dd>
1548-
<p>Return a tuple consisting of <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-scheme">scheme</a>, its <a data-link-type="dfn" href="#concept-url-host">host</a>, and its <a data-link-type="dfn" href="#default-port">default port</a> if its <a data-link-type="dfn" href="#concept-url-port">port</a> is null, and
1549-
its <a data-link-type="dfn" href="#concept-url-port">port</a> otherwise. </p>
1549+
<p>Return a tuple consisting of <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-scheme">scheme</a>, <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-host">host</a>, <a data-link-type="dfn" href="#concept-url">URL</a>’s <a data-link-type="dfn" href="#concept-url-port">port</a>, and null. </p>
15501550
<dt>"<code>file</code>"
15511551
<dd>
15521552
<p>Unfortunate as it is, this is left as an exercise to the reader. When in doubt,
1553-
return a new globally unique identifier. </p>
1553+
return a new <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin-opaque">opaque origin</a>. </p>
15541554
<dt>Otherwise
15551555
<dd>
1556-
<p>Return a new globally unique identifier. </p>
1556+
<p>Return a new <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin-opaque">opaque origin</a>. </p>
15571557
<p class="note no-backref" role="note">This does indeed mean that these <a data-link-type="dfn" href="#concept-url">URLs</a> cannot
15581558
be <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#same-origin">same-origin</a> with themselves. </p>
15591559
</dl>
@@ -2359,7 +2359,8 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
23592359
<ul>
23602360
<li><a href="https://html.spec.whatwg.org/multipage/comms.html#eventsource">EventSource</a>
23612361
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#hashchangeevent">HashChangeEvent</a>
2362-
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#origin-2">origin</a>
2362+
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin-opaque">opaque origin</a>
2363+
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origin</a>
23632364
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#same-origin">same origin</a>
23642365
<li><a href="https://html.spec.whatwg.org/multipage/infrastructure.html#structured-clone">structuredclone</a>
23652366
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#unicode-serialisation-of-an-origin">unicode serialisation of an origin</a>

0 commit comments

Comments
 (0)