mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Move all methods on T to JSRef<T> or JS<T> as appropriate.
This commit is contained in:
parent
7daa97c7e5
commit
109410900c
15 changed files with 574 additions and 521 deletions
|
@ -54,12 +54,17 @@ pub struct IFrameSize {
|
|||
pub subpage_id: SubpageId,
|
||||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
pub fn is_sandboxed(&self) -> bool {
|
||||
pub trait HTMLIFrameElementHelpers {
|
||||
fn is_sandboxed(&self) -> bool;
|
||||
fn set_frame(&mut self, frame: Url);
|
||||
}
|
||||
|
||||
impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
||||
fn is_sandboxed(&self) -> bool {
|
||||
self.sandbox.is_some()
|
||||
}
|
||||
|
||||
pub fn set_frame(&mut self, frame: Url) {
|
||||
fn set_frame(&mut self, frame: Url) {
|
||||
*self.frame = Some(frame);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue