diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-09-02 17:26:54 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-09-08 11:01:34 +0200 |
commit | 0b689a8a312a2da095b2a8cfcc1bf827aac5d4ac (patch) | |
tree | f77886e125fcffc5c6c20df0ca6cb78eee5ff8e6 /components/script/dom/bindings/interface.rs | |
parent | 8ba0cf30a169ec62efbdd8e8d8ae530f441f42f1 (diff) | |
download | servo-0b689a8a312a2da095b2a8cfcc1bf827aac5d4ac.tar.gz servo-0b689a8a312a2da095b2a8cfcc1bf827aac5d4ac.zip |
Implement WebIDL namespaces
Diffstat (limited to 'components/script/dom/bindings/interface.rs')
-rw-r--r-- | components/script/dom/bindings/interface.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/bindings/interface.rs b/components/script/dom/bindings/interface.rs index f7786163cc5..cae5da97887 100644 --- a/components/script/dom/bindings/interface.rs +++ b/components/script/dom/bindings/interface.rs @@ -257,7 +257,8 @@ pub unsafe fn create_named_constructors( } } -unsafe fn create_object( +/// Create a new object with a unique type. +pub unsafe fn create_object( cx: *mut JSContext, proto: HandleObject, class: &'static JSClass, @@ -316,7 +317,9 @@ pub unsafe fn is_exposed_in(object: HandleObject, globals: Globals) -> bool { globals.contains(dom_class.global) } -unsafe fn define_on_global_object( +/// Define a property with a given name on the global object. Should be called +/// through the resolve hook. +pub unsafe fn define_on_global_object( cx: *mut JSContext, global: HandleObject, name: &[u8], |