aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/node.rs7
-rw-r--r--components/script/dom/webidls/Node.webidl2
2 files changed, 4 insertions, 5 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 2d009dd4159..c5d435d5156 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -987,7 +987,7 @@ impl<'a> NodeHelpers for &'a Node {
fn summarize(self) -> NodeInfo {
NodeInfo {
uniqueId: self.get_unique_id(),
- baseURI: self.GetBaseURI().unwrap_or("".to_owned()),
+ baseURI: self.BaseURI(),
parent: self.GetParentNode().map(|node| node.r().get_unique_id()).unwrap_or("".to_owned()),
nodeType: self.NodeType(),
namespaceURI: "".to_owned(), //FIXME
@@ -1950,9 +1950,8 @@ impl<'a> NodeMethods for &'a Node {
}
// https://dom.spec.whatwg.org/#dom-node-baseuri
- fn GetBaseURI(self) -> Option<DOMString> {
- // FIXME (#1824) implement.
- None
+ fn BaseURI(self) -> DOMString {
+ self.owner_doc().URL()
}
// https://dom.spec.whatwg.org/#dom-node-ownerdocument
diff --git a/components/script/dom/webidls/Node.webidl b/components/script/dom/webidls/Node.webidl
index 2bc3624157a..70561bb1b72 100644
--- a/components/script/dom/webidls/Node.webidl
+++ b/components/script/dom/webidls/Node.webidl
@@ -26,7 +26,7 @@ interface Node : EventTarget {
readonly attribute DOMString nodeName;
[Pure]
- readonly attribute DOMString? baseURI;
+ readonly attribute DOMString baseURI;
[Pure]
readonly attribute Document? ownerDocument;