From 0b689a8a312a2da095b2a8cfcc1bf827aac5d4ac Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Fri, 2 Sep 2016 17:26:54 +0200 Subject: Implement WebIDL namespaces --- components/script/dom/bindings/interface.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'components/script/dom/bindings/interface.rs') 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], -- cgit v1.2.3