mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
documnet location
This commit is contained in:
parent
fe1615bc3d
commit
a344d465e8
3 changed files with 7 additions and 0 deletions
|
@ -43,6 +43,7 @@ DOMInterfaces = {
|
||||||
'images',
|
'images',
|
||||||
'importNode',
|
'importNode',
|
||||||
'links',
|
'links',
|
||||||
|
'location',
|
||||||
'plugins',
|
'plugins',
|
||||||
'scripts',
|
'scripts',
|
||||||
'title',
|
'title',
|
||||||
|
|
|
@ -33,6 +33,7 @@ use dom::text::Text;
|
||||||
use dom::processinginstruction::ProcessingInstruction;
|
use dom::processinginstruction::ProcessingInstruction;
|
||||||
use dom::uievent::UIEvent;
|
use dom::uievent::UIEvent;
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
|
use dom::location::Location;
|
||||||
use html::hubbub_html_parser::build_element_from_tag;
|
use html::hubbub_html_parser::build_element_from_tag;
|
||||||
use hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks};
|
use hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks};
|
||||||
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
||||||
|
@ -563,6 +564,10 @@ impl Document {
|
||||||
HTMLCollection::create(&self.window, &NodeCast::from(abstract_self), filter)
|
HTMLCollection::create(&self.window, &NodeCast::from(abstract_self), filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn Location(&mut self, abstract_self: &JS<Document>) -> JS<Location> {
|
||||||
|
self.window.get_mut().Location(&abstract_self.get().window)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn createNodeList(&self, callback: |node: &JS<Node>| -> bool) -> JS<NodeList> {
|
pub fn createNodeList(&self, callback: |node: &JS<Node>| -> bool) -> JS<NodeList> {
|
||||||
let mut nodes: ~[JS<Node>] = ~[];
|
let mut nodes: ~[JS<Node>] = ~[];
|
||||||
match self.GetDocumentElement() {
|
match self.GetDocumentElement() {
|
||||||
|
|
|
@ -17,6 +17,7 @@ interface Document : Node {
|
||||||
readonly attribute DOMString compatMode;
|
readonly attribute DOMString compatMode;
|
||||||
readonly attribute DOMString characterSet;
|
readonly attribute DOMString characterSet;
|
||||||
readonly attribute DOMString contentType;
|
readonly attribute DOMString contentType;
|
||||||
|
readonly attribute Location location;
|
||||||
|
|
||||||
readonly attribute DocumentType? doctype;
|
readonly attribute DocumentType? doctype;
|
||||||
readonly attribute Element? documentElement;
|
readonly attribute Element? documentElement;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue