mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 15:04:24 +03:00
added more C callbacks for exotic objects (#324)
This commit is contained in:
11
quickjs.h
11
quickjs.h
@@ -501,6 +501,17 @@ typedef struct JSClassExoticMethods {
|
||||
/* return < 0 if exception or TRUE/FALSE */
|
||||
int (*set_property)(JSContext *ctx, JSValueConst obj, JSAtom atom,
|
||||
JSValueConst value, JSValueConst receiver, int flags);
|
||||
|
||||
/* To get a consistent object behavior when get_prototype != NULL,
|
||||
get_property, set_property and set_prototype must be != NULL
|
||||
and the object must be created with a JS_NULL prototype. */
|
||||
JSValue (*get_prototype)(JSContext *ctx, JSValueConst obj);
|
||||
/* return < 0 if exception or TRUE/FALSE */
|
||||
int (*set_prototype)(JSContext *ctx, JSValueConst obj, JSValueConst proto_val);
|
||||
/* return < 0 if exception or TRUE/FALSE */
|
||||
int (*is_extensible)(JSContext *ctx, JSValueConst obj);
|
||||
/* return < 0 if exception or TRUE/FALSE */
|
||||
int (*prevent_extensions)(JSContext *ctx, JSValueConst obj);
|
||||
} JSClassExoticMethods;
|
||||
|
||||
typedef void JSClassFinalizer(JSRuntime *rt, JSValue val);
|
||||
|
Reference in New Issue
Block a user