Skip to main content

error_event_ctor

Function error_event_ctor 

Source
pub(crate) fn error_event_ctor(
    it: &mut Interp,
    t: Value,
    a: &[Value],
) -> Result<Value, Value>
Expand description

new ErrorEvent(type, options)(丸ごと未対応だった。reportError() は 内部でこの形の Event を素朴な Obj::plain() で組み立てていたが、 ユーザーコードから直接構築するコンストラクタ自体が存在しなかった)。 基底の Event プロパティは event_ctor を再利用し、 message/filename/lineno/colno/error を追加する。