Skip to main content

event_target_proto_call

Function event_target_proto_call 

Source
fn event_target_proto_call(
    it: &mut Interp,
    this: Value,
    a: &[Value],
    name: &str,
) -> Result<Value, Value>
Expand description

EventTarget.prototype の addEventListener/removeEventListener/dispatchEvent(this を問わない版)。

【2026-10-19】ShadyDOM(YouTube の視聴ページの Polymer)は、これらを EventTarget.prototype から __shady_native_* として写し、window・document・要素に対して .call で使う。 従来は EventTarget が原型を持たず「window.__shady_native_addEventListener is not a function」 で止まっていた。DOM ノードはそのノードの組込みメソッド、自前の同名メソッドを持つ オブジェクト(window 等)はそれ、どちらでもなければ new EventTarget() の実装へ回す。