Move all methods on T to JSRef<T> or JS<T> as appropriate.

This commit is contained in:
Josh Matthews 2014-04-11 14:46:34 -04:00
parent 7daa97c7e5
commit 109410900c
15 changed files with 574 additions and 521 deletions

View file

@ -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);
}
}