on master help sign in
Encourage use of jsg by removing the MakeObjectRef instance for String.
d3f2bf2Hamish Mackenzie
src/Language/Javascript/JSC/Object.hs−6
@@ -298,12 +298,6 @@ array = rethrow . makeArray
298global :: JSC JSObjectRef
298global :: JSC JSObjectRef
299global = ask >>= (liftIO . jscontextgetglobalobject)
299global = ask >>= (liftIO . jscontextgetglobalobject)
300
300
301−-- | A string on its own is assumed to be the name of a property in the global object
302−instance MakeObjectRef String where
303− makeObjectRef name = do
304− this <- global
305− rethrow (objGetPropertyByName this (makeStringRef name)) >>= valToObject
306−
307-- | Get an array containing the property names present on a given object
301-- | Get an array containing the property names present on a given object
308copyPropertyNames :: MakeObjectRef this => this -> JSC JSPropertyNameArrayRef
302copyPropertyNames :: MakeObjectRef this => this -> JSC JSPropertyNameArrayRef
309copyPropertyNames this = do
303copyPropertyNames this = do