From 732a605f02e789243b860250f9faddcb1540b617 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren
A base
element that is the first base
element with an href
content attribute in a particular Document
has a
- frozen base URL. The frozen base URL must be immediately set for an element whenever any of the following situations occur:
Document
has
+ a frozen base URL. The frozen base URL must be immediately
+ set for an element whenever any of the following
+ situations occur:
Let document be element's node document. -
Parse the value of element's href
content attribute relative to document.
If that algorithm fails or if running Is base allowed for Document? on the
- resulting URL record and document returns "Blocked
", then set element's frozen base URL to the
- fallback base URL.
Let urlRecord be the result of parsing the
+ value of element's href
content attribute with
+ document's fallback base URL, and document's character encoding. (Thus, the base
+ element isn't affected by itself.)
Otherwise, set element's frozen base URL to the resulting URL - record.
- +Set element's frozen base URL to document's
+ fallback base URL, if urlRecord is failure or running Is base
+ allowed for Document? on the resulting URL record and document
+ returns "Blocked
", and to urlRecord otherwise.
The href
IDL attribute, on getting, must return
the result of running the following algorithm:
+
-
If the base
element has no href
content
- attribute, then return the document base URL and abort these steps.
If this element has a frozen base URL, return it, serialised.
Let fallback base url be the Document
's fallback
- base URL.
Let document be element's node document.
Let url be the value of the href
- attribute of the base
element.
Let urlRecord be the result of parsing
- url with fallback base url, and the Document
's character encoding. (Thus, the base
's
- href
attribute isn't affected by other base
- elements).
base
element isn't affected by other base
elements or
+ itself.)
+ complicate the latter for two callsites. -->
If urlRecord is failure, return the empty string.
Return the serialisation of urlRecord.
The href
IDL attribute, on setting, must set the