Implement [Func]

This commit is contained in:
Anthony Ramine 2016-05-21 00:09:06 +02:00
parent 0d04acd50f
commit e179cb02ff
6 changed files with 58 additions and 8 deletions

View file

@ -24,7 +24,7 @@ use dom::bindings::str::{ByteString, DOMString, USVString};
use dom::bindings::weakref::MutableWeakRef;
use dom::blob::{Blob, DataSlice};
use dom::url::URL;
use js::jsapi::{HandleValue, JSContext, JSObject};
use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject};
use js::jsval::{JSVal, NullValue};
use std::borrow::ToOwned;
use std::ptr;
@ -567,6 +567,10 @@ impl TestBindingMethods for TestBinding {
fn PrefControlledAttributeEnabled(&self) -> bool { false }
fn PrefControlledMethodDisabled(&self) {}
fn PrefControlledMethodEnabled(&self) {}
fn FuncControlledAttributeDisabled(&self) -> bool { false }
fn FuncControlledAttributeEnabled(&self) -> bool { false }
fn FuncControlledMethodDisabled(&self) {}
fn FuncControlledMethodEnabled(&self) {}
}
impl TestBinding {
@ -577,4 +581,14 @@ impl TestBinding {
pub fn PrefControlledStaticAttributeEnabled(_: GlobalRef) -> bool { false }
pub fn PrefControlledStaticMethodDisabled(_: GlobalRef) {}
pub fn PrefControlledStaticMethodEnabled(_: GlobalRef) {}
pub fn FuncControlledStaticAttributeDisabled(_: GlobalRef) -> bool { false }
pub fn FuncControlledStaticAttributeEnabled(_: GlobalRef) -> bool { false }
pub fn FuncControlledStaticMethodDisabled(_: GlobalRef) {}
pub fn FuncControlledStaticMethodEnabled(_: GlobalRef) {}
}
#[allow(unsafe_code)]
impl TestBinding {
pub unsafe fn condition_satisfied(_: *mut JSContext, _: HandleObject) -> bool { true }
pub unsafe fn condition_unsatisfied(_: *mut JSContext, _: HandleObject) -> bool { false }
}