forked from foreverlikeyou9999/Dux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MOJavaScriptObject.h
50 lines (42 loc) · 1.03 KB
/
MOJavaScriptObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// MOJavaScriptObject.h
// Mocha
//
// Created by Logan Collins on 5/28/12.
// Copyright (c) 2012 Sunflower Softworks. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <JavaScriptCore/JavaScriptCore.h>
/*!
* @class MOJavaScriptObject
* @abstract A thin wrapper around a pure JavaScript object
*/
@interface MOJavaScriptObject : NSObject
/*!
* @method objectWithJSObject:context:
* @abstract Creates a new JavaScript wrapper object
*
* @param jsObject
* @abstract The JavaScript object reference
*
* @param context
* The JavaScript context reference
*
* @result An MOJavaScriptObject object
*/
+ (MOJavaScriptObject *)objectWithJSObject:(JSObjectRef)jsObject context:(JSContextRef)ctx;
/*!
* @property JSObject
* @abstract The JavaScript object reference
*
* @result A JSObjectRef value
*/
@property (readonly) JSObjectRef JSObject;
/*!
* @property JSContext
* @abstract The JavaScript context reference
*
* @result A JSContextRef value
*/
@property (readonly) JSContextRef JSContext;
@end