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