mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Introduce GlobalScope::as_window
This commit is contained in:
parent
2f54022761
commit
766010379e
22 changed files with 30 additions and 43 deletions
|
@ -228,7 +228,7 @@ impl HTMLImageElement {
|
|||
pub fn Image(global: GlobalRef,
|
||||
width: Option<u32>,
|
||||
height: Option<u32>) -> Fallible<Root<HTMLImageElement>> {
|
||||
let document = global.as_window().Document();
|
||||
let document = global.as_global_scope().as_window().Document();
|
||||
let image = HTMLImageElement::new(atom!("img"), None, document.r());
|
||||
if let Some(w) = width {
|
||||
image.SetWidth(w);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue