diff options
author | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2014-08-06 17:27:30 +0900 |
---|---|---|
committer | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2014-08-06 17:40:47 +0900 |
commit | 4da0786951b78f8054a1a47cf7fa6c17ca709c22 (patch) | |
tree | b4588d21b01783af0d21fe21b80e0cd9e66dc2c2 /src/components/script/dom/document.rs | |
parent | e942cd901ef6b01635f40c7650216af65ecaf57f (diff) | |
download | servo-4da0786951b78f8054a1a47cf7fa6c17ca709c22.tar.gz servo-4da0786951b78f8054a1a47cf7fa6c17ca709c22.zip |
Document.getElementById() should return null if the passed argument is empty.
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r-- | src/components/script/dom/document.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index 25768e938cc..e6f0a15fb23 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -153,6 +153,7 @@ impl<'a> DocumentHelpers for JSRef<'a, Document> { let node: &JSRef<Node> = NodeCast::from_ref(element); node.is_in_doc() }); + assert!(!id.is_empty()); let mut idmap = self.idmap.deref().borrow_mut(); |