aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorKevin Ball <kmball11@gmail.com>2015-07-05 15:29:04 -0700
committerKevin Ball <kmball11@gmail.com>2015-07-05 15:29:04 -0700
commitdbbab3b113e24e2e3be4b8556218e44ca5a1db35 (patch)
tree08b27d27f4f7b32261e0143bf2bc56885eb4dc4e /components/script
parent0fb6604cb37da0ca0f4852328def21100a38fd63 (diff)
downloadservo-dbbab3b113e24e2e3be4b8556218e44ca5a1db35.tar.gz
servo-dbbab3b113e24e2e3be4b8556218e44ca5a1db35.zip
Implement Node.baseURI
Diffstat (limited to 'components/script')
-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 b69dd3fad46..b892a60daf3 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -993,7 +993,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
@@ -1956,9 +1956,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;