mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Introduce a NativeProperties struct to store the properties.
This will simplify adding more kinds of properties, such as static attributes.
This commit is contained in:
parent
da28a791e5
commit
886d401ff0
2 changed files with 43 additions and 16 deletions
|
@ -215,6 +215,13 @@ pub fn GetProtoOrIfaceArray(global: *mut JSObject) -> *mut *mut JSObject {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct NativeProperties {
|
||||
pub methods: Option<&'static [JSFunctionSpec]>,
|
||||
pub attrs: Option<&'static [JSPropertySpec]>,
|
||||
pub consts: Option<&'static [ConstantSpec]>,
|
||||
pub staticMethods: Option<&'static [JSFunctionSpec]>,
|
||||
}
|
||||
|
||||
pub type NonNullJSNative =
|
||||
unsafe extern "C" fn (arg1: *mut JSContext, arg2: c_uint, arg3: *mut JSVal) -> JSBool;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue