diff --git a/.gitignore b/.gitignore
index 147ba21..9c0c967 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
.DS_Store
.sass-cache
node_modules
-site
tmp
diff --git a/LICENSE b/LICENSE
index e6eb0de..b3bb1e3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -8,7 +8,7 @@ EXAMPLE-LICENSE-BEGIN and EXAMPLE-LICENSE-END.
The documentation and site code (ie, everything but the examples) on
JavaScripture are built by a community of contributors (see
https://github.com/nkronlage/JavaScripture) and are available under
-the terms of the Create Commons Attribution-ShareAlike license
+the terms of the Creative Commons Attribution-ShareAlike license
(http://creativecommons.org/licenses/by-sa/2.5/). In brief, you may copy and
redistribute the documentation in any form and with any changes as long as
you attribute the original page on JavaScripture and distribute your works
diff --git a/README.md b/README.md
index ef79697..2ae01b8 100644
--- a/README.md
+++ b/README.md
@@ -39,15 +39,13 @@ build the site's html files.
Prerequisites for building
* [Node](http://nodejs.org/download/)
-* [Sass](http://sass-lang.com/install)
-* [Gulp](http://gulpjs.com/)
* Run: npm install
To build the documentation, run:
-* gulp
+* node build.js
-From the root folder. The generated files are in the site/ folder.
+From the root folder. The generated files are in the docs/ folder.
### Documentation File Format
The information for each type is stored in a .jsdoc file. This is a
diff --git a/build.js b/build.js
new file mode 100644
index 0000000..91047d1
--- /dev/null
+++ b/build.js
@@ -0,0 +1,142 @@
+'use strict';
+
+const fs = require('fs');
+const path = require('path');
+const util = require('util');
+const jsdoc = require('./jsdocparser.js');
+const ejs = require('ejs');
+const template = require('./template.js');
+
+const sets = {};
+
+const generateMetadata = (filename) => {
+ console.log(`Generating metadata for ${filename}`);
+ const obj = jsdoc.processFile(filename);
+
+ if (!new RegExp(`/${obj.name}\\.jsdoc`, 'i').test(filename)) {
+ throw `Object ${obj.name} defined in unexpected file ${filename}`;
+ }
+
+ obj.jsdocSourceFile = filename;
+
+ const setName = path.basename(path.dirname(filename));
+
+ const hasDescriptions = !!obj.description ||
+ obj.constructors.some((constructor) => !!constructor.description) ||
+ obj.instanceMembers.some((member) => !!member.description) ||
+ obj.prototypeMembers.some((member) => !!member.description);
+
+ const metadata = {
+ name: obj.name,
+ setName: setName,
+ hasDescriptions: hasDescriptions
+ };
+
+ const addMembers = (name) => {
+ metadata[name] = obj[name].map((member) => ({ name: member.name, onname: member.onname }));
+ };
+
+ addMembers('instanceProperties');
+ addMembers('instanceMethods');
+ addMembers('instanceEvents');
+ addMembers('properties');
+ addMembers('methods');
+
+ let set = sets[setName];
+ if (!set) {
+ set = sets[setName] = [];
+ }
+ set.push(metadata);
+
+ const pretty = false;
+ const json = JSON.stringify(metadata, null, pretty ? ' ' : undefined);
+
+ fs.writeFileSync(`./tmp/metadata/${obj.name}.json`, json, { flag: 'wx' });
+
+ obj.apiSet = { name: setName };
+ createPage(obj);
+};
+
+const createPage = (obj) => {
+ // Validation
+ const errors = [];
+ const all = [].concat(obj.overloads, obj.constructors, obj.instanceProperties, obj.instanceMethods, obj.properties, obj.methods);
+
+ all.forEach((member) => {
+ if (!member) {
+ errors.push(`undefined member in ${obj.name}`);
+ return;
+ }
+
+ if (!member.spec) {
+ errors.push(`No spec for ${obj.name}.${member.name}`);
+ }
+
+ if (!member.description) {
+ errors.push(`No description for ${obj.name}.${member.name}`);
+ }
+
+ if (member.type === 'Function') {
+ // TODO: check member.parameters
+ }
+ });
+
+
+ if (errors.length) {
+ console.warn(errors.join('\n'));
+ }
+
+ const body = template.render('object', { obj });
+
+ const title = `${obj.name} JavaScript API`;
+ const html = template.render('page', { title, body, obj });
+
+ fs.writeFileSync(`./docs/${obj.name}.html`, html);
+};
+
+fs.rmdirSync('./tmp', { recursive: true });
+fs.mkdirSync('./tmp/metadata', { recursive: true });
+
+fs.readdirSync('./docs').map((doc) => {
+ fs.unlinkSync(`./docs/${doc}`);
+});
+
+fs.readdirSync('./content').map((set) => {
+ fs.readdirSync(`./content/${set}/`).map((doc) => {
+ generateMetadata(`./content/${set}/${doc}`);
+ });
+});
+
+for (const set of Object.values(sets)) {
+ set.sort((a, b) => a.name.localeCompare(b.name));
+}
+
+fs.writeFileSync('./tmp/apisets.json', JSON.stringify(sets));
+
+const makeCustomPage = (page, extension = 'html') => {
+ const locals = {
+ apiSets: sets,
+ wrapInPageTemplate: true
+ };
+
+ let output = template.render(page, locals);
+ if (locals.wrapInPageTemplate) {
+ locals.body = output;
+ output = template.render('page', locals);
+ }
+
+ fs.writeFileSync(`./docs/${page}.${extension}`, output);
+};
+
+makeCustomPage('feedback');
+makeCustomPage('index');
+makeCustomPage('license');
+makeCustomPage('thankyou');
+makeCustomPage('javascripture', 'js');
+
+fs.readdirSync('./static').map(file => {
+ fs.copyFile(`./static/${file}`, `./docs/${file}`, err => { if (err) { throw err } });
+ });
+
+
+
diff --git a/content/Browser/TextDecoder.jsdoc b/content/Browser/TextDecoder.jsdoc
new file mode 100644
index 0000000..bae838f
--- /dev/null
+++ b/content/Browser/TextDecoder.jsdoc
@@ -0,0 +1,138 @@
+TextDecoder : Object
+
+Decodes sequences of bytes into %%/String|Strings%%.
+
+Spec:
+https://encoding.spec.whatwg.org/#interface-textdecoder
+
+----
+new TextDecoder() : TextDecoder
+
+Constructs a new TextDecoder that decodes UTF-8 strings.
+
+
+const decoder = new TextDecoder();
+console.log(decoder.decode(new Uint8Array([240,159,152,128,240,159,144,177,226,154,189,239,184,143])));
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder
+
+----
+new TextDecoder(label : String, [options : { \
+ fatal : Boolean, \
+ ignoreBOM : Boolean \
+ }]) : TextDecoder
+
+Constructs a new TextDecoder. See %%https://encoding.spec.whatwg.org/#concept-encoding-get|https://encoding.spec.whatwg.org/#concept-encoding-get%%
+for valid **label** values.
+
+
+const decoder = new TextDecoder('utf-16');
+
+console.log(decoder.decode(new Uint16Array([0xd83d, 0xde00, 0xd83d, 0xdc31, 0x26bd, 0xfe0f])));
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder
+
+----
+instance.encoding : String
+
+Returns the effective encoding from the **label** specified during construction of **this**.
+See %%https://encoding.spec.whatwg.org/#concept-encoding-get|https://encoding.spec.whatwg.org/#concept-encoding-get%%
+for the mapping from **label** values to **encoding**s.
+
+
+const decoder = new TextDecoder();
+console.log(decoder.encoding);
+
+const decoder16 = new TextDecoder('utf-16');
+console.log(decoder16.encoding);
+
+
+ReadOnly:
+true
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder-encoding
+
+----
+instance.fatal : Boolean
+
+
+const decoder = new TextDecoder();
+console.log(decoder.fatal);
+
+const fatalDecoder = new TextDecoder('utf-8', { fatal: true });
+console.log(fatalDecoder.fatal);
+
+
+ReadOnly:
+true
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder-fatal
+
+----
+instance.ignoreBOM : Boolean
+
+
+const decoder = new TextDecoder();
+console.log(decoder.fatal);
+
+const ignoreBOMDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
+console.log(ignoreBOMDecoder.ignoreBOM);
+
+
+ReadOnly:
+true
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder-ignorebom
+
+----
+prototype.decode(input : ArrayBufferView, [options : {\
+ stream : Boolean \
+ }]) : String
+
+Decodes the bytes from **input** into a new String based on **this.encoding**. If
+**options.stream** is **true**, **this** will remember any partially consumed
+characters and apply them to the next **decode()** call.
+
+
+const decoder = new TextDecoder();
+const bytes = new Uint8Array([240,159,152,128,240,159,144,177,226,154,189,239,184,143]);
+console.log(decoder.decode(bytes));
+
+let i = 0;
+const chunkSize = 3;
+let res = '';
+while (i < bytes.length) {
+ res += decoder.decode(bytes.subarray(i, i + chunkSize), { stream: true });
+ i += chunkSize;
+}
+res += decoder.decode(bytes.subarray(i));
+console.log(res);
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder-decode
+
+----
+prototype.decode(input : ArrayBuffer, [options : {\
+ stream : Boolean \
+ }]) : String
+
+Decodes the bytes from **input** into a new String based on **this.encoding**. If
+**options.stream** is **true**, **this** will remember any partially consumed
+characters and apply them to the next **decode()** call.
+
+
+const decoder = new TextDecoder();
+const bytes = new Uint8Array([240,159,152,128,240,159,144,177,226,154,189,239,184,143]);
+console.log(decoder.decode(bytes.buffer));
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textdecoder-decode
diff --git a/content/Browser/TextEncoder.jsdoc b/content/Browser/TextEncoder.jsdoc
new file mode 100644
index 0000000..9842cb8
--- /dev/null
+++ b/content/Browser/TextEncoder.jsdoc
@@ -0,0 +1,70 @@
+TextEncoder : Object
+
+Encodes a %%/String|String%% into a UTF-8 stream of bytes.
+
+Spec:
+https://encoding.spec.whatwg.org/#interface-textencoder
+
+----
+new TextEncoder() : TextEncoder
+
+Creates an encoder that can convert strings to a sequence of UTF-8 bytes.
+
+
+const encoder = new TextEncoder();
+console.log(encoder.encode('abc'));
+console.log(encoder.encode('😀🐱⚽️'));
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textencoder
+
+----
+instance.encoding : String
+
+Returns the encoding method. Currently only **'utf-8'** is supported.
+
+
+const encoder = new TextEncoder();
+console.log(encoder.encoding);
+
+
+ReadOnly:
+true
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textencoder-encoding
+
+----
+prototype.encode(value = '' : String) : Uint8Array
+
+Converts **value** into a sequence of UTF-8 bytes.
+
+
+const encoder = new TextEncoder();
+console.log(encoder.encode('abc'));
+console.log(encoder.encode('😀🐱⚽️'));
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textencoder-encode
+
+----
+prototype.encodeInto(value : String, destination : Uint8Array) : { \
+ read : Number /* The number of UTF-16 characters read from **value**. */, \
+ written : Number /* The number of bytes written to **destination**. */ \
+ }
+
+Writes **value** as a sequence of UTF-8 bytes into **destination**. Returns
+information about the number of characters read from **value** and bytes
+written to **destination**.
+
+
+const encoder = new TextEncoder();
+const buffer = new Uint8Array(20);
+console.dir(encoder.encodeInto('😀🐱⚽️', buffer));
+console.log(buffer);
+
+
+Spec:
+https://encoding.spec.whatwg.org/#dom-textencoder-encodeinto
diff --git a/content/Browser/applicationcache.jsdoc b/content/Browser/applicationcache.jsdoc
index 0fe4a05..2375e76 100644
--- a/content/Browser/applicationcache.jsdoc
+++ b/content/Browser/applicationcache.jsdoc
@@ -1,6 +1,6 @@
ApplicationCache : EventTarget
-The ApplicationCache describes the state of files cached for the current
+The ApplicationCache describes the state of files cached for the current
page.
Pages set the **manifest=""** attribute on the ****
@@ -9,28 +9,16 @@ tag to define the set of files to be cached.
Obtained through the %%/Window#applicationCache|**window.applicationCache**%%
property.
-See %%http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html|Offline WebPage Spec%% for
+See %%https://html.spec.whatwg.org/multipage/offline.html|Offline WebPage Spec%% for
more details.
Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#appcache
-
-----
-instance[index : Number] : String
-
-----
-instance.length : Number
-
-ReadOnly:
-true
-
-Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#length6
+https://html.spec.whatwg.org/#applicationcache
----
instance.status : Number
-The current status of the cache. Will be one of
+The current status of the cache. Will be one of
%%#UNCACHED|**UNCACHED**%%,
%%#IDLE|**IDLE**%%,
%%#CHECKING|**CHECKING**%%,
@@ -42,7 +30,7 @@ ReadOnly:
true
Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#status0
+https://html.spec.whatwg.org/#dom-appcache-status
----
prototype.update() : undefined
@@ -51,37 +39,17 @@ Checks to see if there is an updated manifest file on the server. This automatic
happens once when the page first loads.
Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#update1
+https://html.spec.whatwg.org/#dom-appcache-update
----
prototype.swapCache() : undefined
Replaces application cache with the updated list of files from the server. This
-does not automatically update the resources of the page. You can use
+does not automatically update the resources of the page. You can use
%%Location#reload|**location.reload()**%% to update the page.
Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#swapcache
-
-----
-prototype.item(index : Number) : String
-
-Same as %%#indexer_Number|**this[index]**%%.
-
-Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#itemindex4
-
-----
-prototype.add(uri : String) : undefined
-
-Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#adduri
-
-----
-prototype.remove(uri : String) : undefined
-
-Spec:
-http://www.w3.org/TR/2008/WD-html5-20080122/#remove1
+https://html.spec.whatwg.org/#dom-appcache-swapcache
----
event.checking : listener(event : Event) : undefined
@@ -110,7 +78,7 @@ event.progress : listener(event : ProgressEvent) : undefined
----
event.updateready : listener(event : Event) : undefined
-Event fired when all resources listed in the manifest have been downloaded.
+Event fired when all resources listed in the manifest have been downloaded.
----
event.cached : listener(event : Event) : undefined
diff --git a/content/Browser/broadcastchannel.jsdoc b/content/Browser/broadcastchannel.jsdoc
new file mode 100644
index 0000000..4061452
--- /dev/null
+++ b/content/Browser/broadcastchannel.jsdoc
@@ -0,0 +1,165 @@
+BroadcastChannel : EventTarget
+
+BroadcastChannel provides a simple way for different contexts (such as %%/Window|Windows%%
+or %%/Worker|Workers%%) in the same %%URL#origin|origin%% to broadcast messages all
+other BroadcastChannels created with the same %%#name|name%%.
+
+See also %%/Window#postMessage|Window.postMessage%% and %%/MessageChannel|MessageChannel%%.
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#broadcastchannel
+
+----
+new BroadcastChannel(name : String) : BroadcastChannel
+
+Creates a new BroadcastChannel for the specified **name**.
+
+
+
+
+
+
+
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#dom-broadcastchannel
+
+----
+instance.name : String
+
+Returns the name of the channel.
+
+
+
+
+
+ReadOnly:
+true
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#dom-broadcastchannel-name
+
+----
+prototype.close() : undefined
+
+Causes **this** to stop listening to message. Allows **this** to be garbage collected.
+
+
+
+
+
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#dom-broadcastchannel-close
+
+----
+prototype.postMessage(message : Object) : undefined
+
+Serializes **message** and sends it to all other BroadcastChannels sharing the same
+%%#name|name%% as **this** on the same origin.
+
+
+
+
+
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#dom-broadcastchannel-postmessage
+
+----
+event.message : listener(event : MessageEvent) : undefined
+
+Fired when %%#postMessage|**postMessage**%% is called on another BroadcastChannel
+sharing the same %%#name|name%% as **this**.
+
+
+
+
+
+
+
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#handler-broadcastchannel-onmessage
+
+----
+event.messageerror : listener(event : MessageEvent) : undefined
+
+Fired when unable to deserialize a message from another BroadcastChannel in **this**'
+context.
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#handler-broadcastchannel-onmessageerror
diff --git a/content/Browser/external.jsdoc b/content/Browser/external.jsdoc
index 888b694..2ffcfde 100644
--- a/content/Browser/external.jsdoc
+++ b/content/Browser/external.jsdoc
@@ -1,7 +1,7 @@
External : Object
Spec:
-http://www.w3.org/html/wg/drafts/html/master/webappapis.html#external
+https://html.spec.whatwg.org/#external
----
prototype.AddSearchProvider(url : String) : undefined
diff --git a/content/Browser/formdata.jsdoc b/content/Browser/formdata.jsdoc
index 4bf84ab..eb18b6c 100644
--- a/content/Browser/formdata.jsdoc
+++ b/content/Browser/formdata.jsdoc
@@ -4,7 +4,7 @@ Use with %%XMLHttpRequest#send_FormData|**XMLHttpRequest.send()**%% to
send %%/HTMLFormElement|form%% results to a server without navigating.
Spec:
-http://www.w3.org/TR/XMLHttpRequest2/#interface-formdata
+https://xhr.spec.whatwg.org/#interface-formdata
----
new FormData() : FormData
@@ -17,7 +17,7 @@ Constructs an empty FormData.
var send = function() {
var request = new XMLHttpRequest();
// POST to httpbin which returns the POST data as JSON
- request.open('POST', 'http://httpbin.org/post', /* async = */ false);
+ request.open('POST', 'https://httpbin.org/post', /* async = */ false);
var formData = new FormData();
formData.append('key1', 'value1');
@@ -47,7 +47,7 @@ Constructs a FormData using the values from the specified **form**.
var request = new XMLHttpRequest();
// POST to httpbin which returns the POST data as JSON
- request.open('POST', 'http://httpbin.org/post', /* async = */ false);
+ request.open('POST', 'https://httpbin.org/post', /* async = */ false);
var formData = new FormData(document.getElementById('test-form'));
request.send(formData);
@@ -75,7 +75,7 @@ Appends the **name/value** pair to the FormData.
var request = new XMLHttpRequest();
// POST to httpbin which returns the POST data as JSON
- request.open('POST', 'http://httpbin.org/post', /* async = */ false);
+ request.open('POST', 'https://httpbin.org/post', /* async = */ false);
var formData = new FormData(document.getElementById('test-form'));
@@ -106,7 +106,7 @@ Appends the **name/value** as a file with the specified **filename**.
var request = new XMLHttpRequest();
// POST to httpbin which returns the POST data as JSON
- request.open('POST', 'http://httpbin.org/post', /* async = */ false);
+ request.open('POST', 'https://httpbin.org/post', /* async = */ false);
var formData = new FormData(document.getElementById('test-form'));
diff --git a/content/Browser/hashchangeevent.jsdoc b/content/Browser/hashchangeevent.jsdoc
index a8f1908..c6f7203 100644
--- a/content/Browser/hashchangeevent.jsdoc
+++ b/content/Browser/hashchangeevent.jsdoc
@@ -3,7 +3,7 @@ HashChangeEvent : Event
See %%/Window#onhashchange|**window.onhashchange**%%.
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#hashchangeevent
+https://html.spec.whatwg.org/multipage/history.html#hashchangeevent
----
new HashChangeEvent( \
@@ -23,7 +23,7 @@ ReadOnly:
true
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#dom-hashchangeevent-oldurl
+https://html.spec.whatwg.org/multipage/history.html#dom-hashchangeevent-oldurl
----
instance.newURL : Object
@@ -34,4 +34,4 @@ ReadOnly:
true
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#dom-hashchangeevent-newurl
+https://html.spec.whatwg.org/multipage/history.html#dom-hashchangeevent-newurl
diff --git a/content/Browser/history.jsdoc b/content/Browser/history.jsdoc
index 1da9343..4c6efe0 100644
--- a/content/Browser/history.jsdoc
+++ b/content/Browser/history.jsdoc
@@ -11,12 +11,12 @@ back/forward buttons.
See also %%/Location|Location%%.
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-history-interface
+https://html.spec.whatwg.org/multipage/browsers.html#the-history-interface
----
instance.length : Number
-The number of items in the browser session's history.
+The number of items in the browser session's history.
@@ -67,12 +67,12 @@ ReadOnly:
true
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-length
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-length
----
instance.state : Object
-The data passed to %%#pushState|**pushState()**%% or
+The data passed to %%#pushState|**pushState()**%% or
%%#replaceState|**replaceState()**%% for the current page.
@@ -124,13 +124,13 @@ ReadOnly:
true
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-state
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-state
----
prototype.go([delta : Number]) : undefined
Navigates through the session history by the specified amount. If
-**delta** is not provided, **go()** acts the same as
+**delta** is not provided, **go()** acts the same as
%%Location#reload|**location.reload()**%% and reloads the current page.
See also %%#back|**back()**%% and %%#forward|**forward()**%%.
@@ -180,7 +180,7 @@ See also %%#back|**back()**%% and %%#forward|**forward()**%%.
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-go
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-go
----
prototype.back() : undefined
@@ -234,7 +234,7 @@ Navigates back one page in the session history. Equivalent to
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-back
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-back
----
prototype.forward() : undefined
@@ -288,15 +288,15 @@ Navigates forward one page in the session history. Equivalent to
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-forward
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-forward
----
prototype.pushState(state : Object, title : String, [url : String]) : undefined
-Adds a new entry to the session history.
-**state** is available on the %%#state|**history.state**%% property.
-**title** is applied to %%Document#title|**document.title**%%.
-If **url** is specified, the %%Location#href|**location.href**%% is
+Adds a new entry to the session history.
+**state** is available on the %%#state|**history.state**%% property.
+**title** is applied to %%Document#title|**document.title**%%.
+If **url** is specified, the %%Location#href|**location.href**%% is
changed to the provided value.
@@ -346,15 +346,15 @@ changed to the provided value.
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-pushstate
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-pushstate
----
prototype.replaceState(state : Object, title : String, [url : String]) : undefined
-Replaces the current entry in the session history with the provided values.
-**state** is available on the %%#state|**history.state**%% property.
-**title** is applied to %%Document#title|**document.title**%%.
-If **url** is specified, the %%Location#href|**location.href**%% is
+Replaces the current entry in the session history with the provided values.
+**state** is available on the %%#state|**history.state**%% property.
+**title** is applied to %%Document#title|**document.title**%%.
+If **url** is specified, the %%Location#href|**location.href**%% is
changed to the provided value.
@@ -404,4 +404,4 @@ changed to the provided value.
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-history-replacestate
+https://html.spec.whatwg.org/multipage/browsers.html#dom-history-replacestate
diff --git a/content/Browser/messagechannel.jsdoc b/content/Browser/messagechannel.jsdoc
new file mode 100644
index 0000000..eb80165
--- /dev/null
+++ b/content/Browser/messagechannel.jsdoc
@@ -0,0 +1,66 @@
+MessageChannel : Object
+
+A message channel allows sending messages between contexts, such as two
+%%/Worker|Workers%%, by %%/Window#postMessage|transferring%% the MessageChannel's
+%%/MessagePort|MessagePorts%% to the workers.
+
+See also %%/Window#postMessage|Window.postMessage%% and %%/BroadcastChannel|BroadcastChannel%%.
+
+Spec:
+https://html.spec.whatwg.org/multipage/web-messaging.html#messageport
+
+----
+new MessageChannel() : MessageChannel
+
+
+
+
+
+
+
+----
+instance.port1 : MessagePort
+
+The first port the channel.
+
+ReadOnly:
+true
+
+----
+instance.port2 : MessagePort
+
+The second port the channel.
+
+ReadOnly:
+true
+
diff --git a/content/Browser/messageevent.jsdoc b/content/Browser/messageevent.jsdoc
index 0cdf507..0049fe3 100644
--- a/content/Browser/messageevent.jsdoc
+++ b/content/Browser/messageevent.jsdoc
@@ -1,7 +1,7 @@
MessageEvent : Event
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#messageevent
+https://html.spec.whatwg.org/multipage/comms.html#messageevent
----
new MessageEvent( \
diff --git a/content/Browser/messageport.jsdoc b/content/Browser/messageport.jsdoc
index ebbd1bc..29a3450 100644
--- a/content/Browser/messageport.jsdoc
+++ b/content/Browser/messageport.jsdoc
@@ -1,17 +1,65 @@
MessagePort : EventTarget
+Represents one side of a %%/MessageChannel|MessageChannel%% that can send
+messages to and receive messages from the other MessagePort of the MessageChannel.
+MessagePorts can be transferred to other contexts by passing it in the
+**transfer** parameter of %%#postMessage|**MessagePort.postMessage()**%% or
+%%/Window#postMessage|**Window.postMessage()**%%.
+
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#messageport
+https://html.spec.whatwg.org/multipage/web-messaging.html#messageport
----
-prototype.postMessage(message : Object, [transfer : Array]) : undefined
+prototype.postMessage(message : Object, [transfer : Array]) : undefined
+
+Serializes **message** and sends it to the other MessagePort.
+
+
+
+
+
+
+
+
----
instance.start() : undefined
+Starts listening to messages. This is automatically called if you set the
+%%#message|onmessage%% event listener.
+
----
instance.close() : undefined
----
-event.message : listener(event : ProgressEvent) : undefined
+event.message : listener(event : MessageEvent) : undefined
+Fired when %%#postMessage|**postMessage**%% is called on the other port of the
+%%/MessageChannel|MessageChannel%%. Setting **onmessage** will automatically
+call %%#start|**start()**%%. When using
+%%/EventTarget#addEventListener|**addEventListener('message')**%%, you must
+call **start()** to begin receiving **message** events.
diff --git a/content/Browser/navigator.jsdoc b/content/Browser/navigator.jsdoc
index 93da71a..4cec2d7 100644
--- a/content/Browser/navigator.jsdoc
+++ b/content/Browser/navigator.jsdoc
@@ -15,6 +15,15 @@ prototype.getUserMedia( \
Spec:
http://dev.w3.org/2011/webrtc/editor/getusermedia.html#dom-navigator-getusermedia
+----
+instance.clipboard : Clipboard
+
+ReadOnly:
+true
+
+Spec:
+https://w3c.github.io/clipboard-apis/#navigator-interface
+
----
instance.maxTouchPoints : Number
@@ -23,3 +32,18 @@ true
Spec:
http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints
+
+----
+prototype.getGamepads() : Iterable
+
+Spec:
+https://w3c.github.io/gamepad/#navigator-interface-extension
+
+----
+instance.xr : XRSystem
+
+ReadOnly:
+true
+
+Spec:
+https://immersive-web.github.io/webxr/#navigator-xr-attribute
diff --git a/content/Browser/popstateevent.jsdoc b/content/Browser/popstateevent.jsdoc
index ab2eccb..4815738 100644
--- a/content/Browser/popstateevent.jsdoc
+++ b/content/Browser/popstateevent.jsdoc
@@ -3,7 +3,7 @@ PopStateEvent : Event
See %%/Window#onpopstate|**window.onpopstate**%%.
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#the-popstateevent-interface
+https://html.spec.whatwg.org/multipage/history.html#the-popstateevent-interface
----
new PopStateEvent( \
@@ -22,4 +22,4 @@ ReadOnly:
true
Spec:
-http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#dom-popstateevent-state
+https://html.spec.whatwg.org/multipage/history.html#dom-popstateevent-state
diff --git a/content/Browser/promiserejectionevent.jsdoc b/content/Browser/promiserejectionevent.jsdoc
new file mode 100644
index 0000000..1ccbafc
--- /dev/null
+++ b/content/Browser/promiserejectionevent.jsdoc
@@ -0,0 +1,58 @@
+PromiseRejectionEvent : Event
+
+Event data for when a %%/Promise|Promise%%'s reject handler is called or an exception is
+thrown in an Promise executor function or in an async function. See
+%%/Window#onunhandledrejection|window.onunhandledrejection%%.
+
+Spec:
+https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent
+
+----
+instance.promise : Promise
+
+The promise that had the unhandled rejection.
+
+
+
+
+
+ReadOnly:
+true
+
+---
+instance.reason : Object
+
+The object passed to the reject handler or the object thrown in an Promise executor
+function or in an async function.
+
+
+
+
+
+ReadOnly:
+true
diff --git a/content/Browser/response.jsdoc b/content/Browser/response.jsdoc
deleted file mode 100644
index 312c74e..0000000
--- a/content/Browser/response.jsdoc
+++ /dev/null
@@ -1,76 +0,0 @@
-Response : Object
-
-Represents a response from a web request initiated by %%/Window#fetch|fetch()%%.
-fetch(), %%/Request|Request%% and Response are a new, low level replacement for
-%%/XMLHttpRequest|XMLHttpRequest%%.
-
-Spec:
-https://fetch.spec.whatwg.org/#response-class
-
-----
-new Response([body : Object, [init : { \
- status = 200 : Number, \
- statusText = 'OK' : String, \
- headers : Object \
- }]]) : Response
-
-----
-instance.headers : Headers
-
-ReadOnly:
-true
-
-----
-instance.status : Number
-
-ReadOnly:
-true
-
-----
-instance.statusText : String
-
-ReadOnly:
-true
-
-----
-instance.type : String
-
-Will be one of:
-**'basic'**,
-**'cors'**,
-**'default'**,
-**'error'**,
-**'opaque'**.
-
-ReadOnly:
-true
-
-----
-instance.url : String
-
-ReadOnly:
-true
-
-----
-prototype.arrayBuffer() : Promise
-
-----
-prototype.blob() : Promise
-
-----
-prototype.clone() : Response
-
-----
-prototype.formData() : Promise
-
-----
-prototype.json() : Promise