Skip to content

Commit

Permalink
Add module scripts (w3c#469)
Browse files Browse the repository at this point in the history
* CSP integrations for Issue w3c#201

Had to adapt "resulting URL record" -> "resulting parsed URL" (will fix
with changes to 2.5.2 eventually)

* Update refs to CSP3 (from CSP1 Note) for Issue w3c#191

Also fix typo 'teh'

* Groundwork for realms w3c#190 and scripting updates w3c#165, w3c#189

Importing dependent changes since last sync of WHATWG in mid-Jan.
Added JS-related terms

* intermediate: translated definitions in scripting section

* Imports 3 fetch script algorithms
and reorders a few sections to match WHATWG

* add algorithms for script creation

* WIP: Syncing changes through event handler section

* webappapi include mostly synced. script element section remains

* syncing changes for the script element

* pulling in more required sections for linking issues

* Further reducing linking issues

* fixes more linking issues

* Finally builds CLEAN!

* Adding some missing CSP changes

* Adding a few more CSP dependencies

* All CSP changes validated and builds clean

* removing tables from dt elements for readability

* Fix a minor bad merge issue
  • Loading branch information
travisleithead authored and arronei committed Apr 17, 2017
1 parent 6feda9b commit ce79ed3
Show file tree
Hide file tree
Showing 9 changed files with 442 additions and 50 deletions.
6 changes: 5 additions & 1 deletion sections/browsers.include
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@
: The <a>realm execution context</a>
:: Return <var>execution context</var>.

: The <a>module map</a>
:: Return the <a lt="document module map">module map</a> of the {{Document}} with which
<var>window</var> is currently associated.

: The <a>responsible browsing context</a>
:: Return the <a>browsing context</a> with which <var>window</var> is associated.

Expand Down Expand Up @@ -3869,7 +3873,7 @@
object.
* Let <var>realm execution context</var> be the created
<a>JavaScript execution context</a>.
* Do not obtain any source texts for scripts.
* Do not obtain any source texts for scripts or modules.
2. <a>Set up a browsing context environment settings object</a> with
<var>realm execution context</var>, and let <var>settings object</var> be the result.
3. Set <var>window</var>'s
Expand Down
11 changes: 7 additions & 4 deletions sections/dom.include
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
<a>Content Security Policy</a> objects active in this context. The list is empty unless otherwise
specified.

The {{Document}} has a <dfn lt="document module map">module map</dfn>, which is a
<a>module map</a>, initially empty.

<h4 id="resource-metadata-management">Resource metadata management</h4>

<dl class="domintro">
Expand Down Expand Up @@ -1576,9 +1579,9 @@
indirectly through the "<code>bogus</code>" element.

<pre class="bad">
&lt;div xmlns="https://www.w3.org/1999/xhtml" dir="rtl">
&lt;div xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
&lt;bogus xmlns="https://example.net/ns" dir="ltr">
&lt;span xmlns="https://www.w3.org/1999/xhtml">
&lt;span xmlns="http://www.w3.org/1999/xhtml">
&lt;/span>
&lt;/bogus>
&lt;/div>
Expand Down Expand Up @@ -1683,13 +1686,13 @@

In <a>HTML documents</a>, elements in the <a>HTML namespace</a> may have an <code>xmlns</code>
attribute specified, if, and only if, it has the exact value
"<code>https://www.w3.org/1999/xhtml</code>". This does not apply to <a>XML documents</a>.
"<code>http://www.w3.org/1999/xhtml</code>". This does not apply to <a>XML documents</a>.

<p class="note">
In HTML, the <code>xmlns</code> attribute has absolutely no effect. It is basically a talisman.
It is allowed merely to make migration to and from XHTML mildly easier. When parsed by an
<a>HTML parser</a>, the attribute ends up in no namespace, not the
"<code>https://www.w3.org/2000/xmlns/</code>" namespace like namespace declaration attributes in
"<code>http://www.w3.org/2000/xmlns/</code>" namespace like namespace declaration attributes in
XML do.
</p>

Expand Down
11 changes: 8 additions & 3 deletions sections/infrastructure.include
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@
<h4 id="xml">XML</h4>

To ease migration from HTML to XHTML, user agents conforming to this specification will place elements in
HTML in the <code>https://www.w3.org/1999/xhtml</code> namespace, at least for the purposes of the
HTML in the <code>http://www.w3.org/1999/xhtml</code> namespace, at least for the purposes of the
DOM and CSS. The term "<dfn lt="html element|html elements">HTML elements</dfn>", when used in this specification, refers to any
element in that namespace, and thus refers to both HTML and XHTML elements.

Except where otherwise stated, all elements defined or mentioned in this specification are in the
<a>HTML namespace</a> ("<code>https://www.w3.org/1999/xhtml</code>"), and all attributes defined or
<a>HTML namespace</a> ("<code>http://www.w3.org/1999/xhtml</code>"), and all attributes defined or
mentioned in this specification have no namespace.

The term <dfn>element type</dfn> is used to refer to the set of elements that have a given local
Expand Down Expand Up @@ -831,11 +831,14 @@
* <a>%ObjProto_toString%</a>
* <a>%ObjProto_valueOf%</a>
* The <a>FunctionBody</a> production
* The <a>Module</a> production
* The <a>Pattern</a> production
* The <a for="ecma">Script</a> production
* The <a for="ecma">Type</a> notation
* The <a for="ecma">List</a> and <a>Record</a> specification types
* The <a>Property Descriptor</a> specification type
* The <a>Source Text Module Record</a> specification type and its <a>ModuleEvaluation</a>
and <a>ModuleDeclarationInstantiation</a> methods
* The <a>ArrayCreate</a> abstract operation
* The <a>Call</a> abstract operation
* The <a>CloneArrayBuffer</a> abstract operation
Expand All @@ -850,6 +853,7 @@
* The <a>HasOwnProperty</a> abstract operation
* The <a>HostEnsureCanCompileStrings</a> abstract operation
* The <a>HostPromiseRejectionTracker</a> abstract operation
* The <a>HostResolveImportedModule</a> abstract operation
* The <a>InitializeHostDefinedRealm</a> abstract operation
* The <a>IsAccessorDescriptor</a> abstract operation
* The <a>IsCallable</a> abstract operation
Expand All @@ -867,6 +871,7 @@
* The <a>OrdinarySet</a> abstract operation
* The <a>OrdinaryDelete</a> abstract operation
* The <a>OrdinaryOwnPropertyKeys</a> abstract operation
* The <a>ParseModule</a> abstract operation
* The <a>ParseScript</a> abstract operation
* The <a>RunJobs</a> abstract operation
* The <a>SameValue</a> abstract operation
Expand Down Expand Up @@ -1537,7 +1542,7 @@
determined in the following way:

1. If the context node is from an HTML DOM, the default element namespace is
"https://www.w3.org/1999/xhtml".
"http://www.w3.org/1999/xhtml".
2. Otherwise, the default element namespace URI is null.

<p class="note">
Expand Down
10 changes: 5 additions & 5 deletions sections/obsolete.include
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
DOCTYPE</a> will also trigger a warning.
</p>

<h4 id="warnings-for-obsolete-but-conforming-features">Warnings for obsolete but conforming features</h4>
<h4 id="warnings-for-obsolete-but-conforming-features">Warnings for obsolete but conforming features</h4>

To ease the transition from HTML Transitional documents to the language defined in <em>this</em>
specification, and to discourage certain features that are only allowed in very few circumstances,
Expand All @@ -55,9 +55,9 @@
between likely mistakes (regular conformance errors) and mere vestigial markup or unusual and
discouraged practices (these warnings).

The following features must be categorized as described above:
The following features must be categorized as described above:

* The presence of an <a>obsolete permitted DOCTYPE</a> in an <a>HTML document</a>.
* The presence of an <a>obsolete permitted DOCTYPE</a> in an <a>HTML document</a>.

* The presence of a <{img/border}> attribute on an <{img}> element if its value is the string
"<code>0</code>".
Expand All @@ -79,10 +79,10 @@
of these obsolete features, and pages that have no conformance errors but do have some of these
obsolete features.

<p class="example">
<p class="example">
For example, a validator could report some pages as "Valid HTML" and others as "Valid HTML with
warnings".
</p>
</p>

<h3 id="non-conforming-features">Non-conforming features</h3>

Expand Down
2 changes: 1 addition & 1 deletion sections/semantics-embedded-content.include
Original file line number Diff line number Diff line change
Expand Up @@ -4401,7 +4401,7 @@ attribute's value is a type that a <a>plugin</a> supports, then the value of the

At least one of either the <code>data</code> attribute or the <code>type</code> attribute must be present.

The <dfn element-attr for="object"><code>typeMustMatch</code></dfn> attribute is a
The <dfn element-attr for="object"><code>typemustmatch</code></dfn> attribute is a
<a>boolean attribute</a> whose presence indicates that the resource specified by the <code>data</code> attribute is only to be used if the value of the <code>type</code> attribute and the <a>Content-Type</a> of the
aforementioned resource match.

Expand Down
Loading

0 comments on commit ce79ed3

Please sign in to comment.