aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/interface.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-09-02 17:26:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-09-08 11:01:34 +0200
commit0b689a8a312a2da095b2a8cfcc1bf827aac5d4ac (patch)
treef77886e125fcffc5c6c20df0ca6cb78eee5ff8e6 /components/script/dom/bindings/interface.rs
parent8ba0cf30a169ec62efbdd8e8d8ae530f441f42f1 (diff)
downloadservo-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.rs7
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],