Introduce GlobalScope::constellation_chan

This commit is contained in:
Anthony Ramine 2016-10-01 04:15:47 +02:00
parent ae3763e7b3
commit f789e73fd2
14 changed files with 79 additions and 60 deletions

View file

@ -13,6 +13,7 @@ use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
use dom::eventtarget::EventTarget;
use dom::globalscope::GlobalScope;
use dom::htmlelement::HTMLElement;
use dom::node::{Node, document_from_node, window_from_node};
use dom::virtualmethods::VirtualMethods;
@ -137,7 +138,7 @@ impl VirtualMethods for HTMLBodyElement {
let document = window.Document();
document.set_reflow_timeout(time::precise_time_ns() + INITIAL_REFLOW_DELAY);
let event = ConstellationMsg::HeadParsed;
window.constellation_chan().send(event).unwrap();
window.upcast::<GlobalScope>().constellation_chan().send(event).unwrap();
}
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {