Trait boa_engine::class::Class
source · [−]pub trait Class: NativeObject + Sized {
const NAME: &'static str;
const LENGTH: usize = 0usize;
const ATTRIBUTES: Attribute = _;
fn constructor(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<Self>;
fn init(class: &mut ClassBuilder<'_>) -> JsResult<()>;
}
Expand description
Native class.
Required Associated Constants
Provided Associated Constants
The amount of arguments the class constructor
takes, default is 0
.
sourceconst ATTRIBUTES: Attribute = _
const ATTRIBUTES: Attribute = _
The attributes the class will be binded with, default is writable
, enumerable
, configurable
.
Required Methods
The constructor of the class.
sourcefn init(class: &mut ClassBuilder<'_>) -> JsResult<()>
fn init(class: &mut ClassBuilder<'_>) -> JsResult<()>
Initializes the internals and the methods of the class.