From d07d08498b4b83c59419f184092cd58b199ebb00 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 31 May 2016 14:31:08 +0200 Subject: [PATCH] Use HTML's 'document base URL' concept. This definition is more correct right now, and using a getter rather than a mutable field makes it easier to figure out what is returned. CC . --- dom.bs | 9 ++++----- dom.html | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dom.bs b/dom.bs index 33d39ddb6..53f3db939 100644 --- a/dom.bs +++ b/dom.bs @@ -69,6 +69,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/ text: origin; url: concept-origin urlPrefix: infrastructure.html text: in parallel + text: document base URL url: https://w3c.github.io/DOM-Parsing/#widl-Range-createContextualFragment-DocumentFragment-DOMString-fragment type: method; text: createContextualFragment(); for: Range; type: interface @@ -3607,11 +3608,11 @@ the first matching statement, switching on the context object:
node . {{Node/baseURI}} -
Returns node's node document's base URL. +
Returns node's node document's document base URL.
The baseURI attribute's getter must return -node document's base URL, serialized. +node document's document base URL, serialized.
@@ -4546,7 +4547,6 @@ dictionary ElementCreationOptions { known as documents. Each document has an associated -base URL (a URL), encoding (an encoding), content type (a string), URL (a URL), @@ -4555,8 +4555,7 @@ Each document has an associated [[!ENCODING]] [[!URL]] -Unless stated otherwise, a document's base URL is -"about:blank", encoding is the utf-8 +Unless stated otherwise, a document's encoding is the utf-8 encoding, content type is "application/xml", URL is "about:blank", type is "xml", and its diff --git a/dom.html b/dom.html index add5cc4e8..aac5b98b8 100644 --- a/dom.html +++ b/dom.html @@ -2341,9 +2341,9 @@

node . baseURI -
Returns node’s node document’s base URL. +
Returns node’s node document’s document base URL. -

The baseURI attribute’s getter must return node document’s base URL, serialized.

+

The baseURI attribute’s getter must return node document’s document base URL, serialized.


node . isConnected @@ -2803,9 +2803,8 @@

Document nodes are simply known as documents.

-

Each document has an associated base URL (a URL), encoding (an encoding), content type (a string), URL (a URL), type ("xml" or "html"), and mode ("no-quirks", "quirks", or "limited-quirks"). [ENCODING] [URL]

-

Unless stated otherwise, a document’s base URL is -"about:blank", encoding is the utf-8 encoding, content type is +

Each document has an associated encoding (an encoding), content type (a string), URL (a URL), type ("xml" or "html"), and mode ("no-quirks", "quirks", or "limited-quirks"). [ENCODING] [URL]

+

Unless stated otherwise, a document’s encoding is the utf-8 encoding, content type is "application/xml", URL is "about:blank", type is "xml", and its mode is "no-quirks".

Unless stated otherwise, a document’s origin is a new opaque origin. [HTML]

A document is said to be an XML document if its type is "xml", and an HTML document otherwise. Whether a document is an HTML document or an XML document affects the behavior of certain APIs.