mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass a &GlobalScope to WebIDL static methods and constructors
This commit is contained in:
parent
1fd470889d
commit
19108aa330
56 changed files with 198 additions and 245 deletions
|
@ -6,7 +6,6 @@ use core::nonzero::NonZero;
|
|||
use dom::bindings::codegen::Bindings::TextEncoderBinding;
|
||||
use dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoderMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::str::{DOMString, USVString};
|
||||
|
@ -38,8 +37,8 @@ impl TextEncoder {
|
|||
}
|
||||
|
||||
// https://encoding.spec.whatwg.org/#dom-textencoder
|
||||
pub fn Constructor(global: GlobalRef) -> Fallible<Root<TextEncoder>> {
|
||||
Ok(TextEncoder::new(global.as_global_scope()))
|
||||
pub fn Constructor(global: &GlobalScope) -> Fallible<Root<TextEncoder>> {
|
||||
Ok(TextEncoder::new(global))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue