mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 19:51:11 +08:00
feat: 事件目标弱引用注册表加三方法加原型链
This commit is contained in:
@@ -85,9 +85,9 @@ pub fn bind_broadcast_channel(core: &Arc<KernelCore>, session: &KernelSession, g
|
||||
proto.bump_generation();
|
||||
}
|
||||
|
||||
// [[Prototype]] → Object.prototype(幂等,裸写槽)。
|
||||
let object_proto_val = JsValue::from_js_object(world.object_proto.as_ptr() as *mut JsObject);
|
||||
let _ = proto.set_proto(object_proto_val);
|
||||
// [[Prototype]] → EventTarget.prototype(事件三方法经原型链可达;幂等,裸写槽)。
|
||||
let et_proto_val = JsValue::from_js_object(world.event_target_proto.as_ptr() as *mut JsObject);
|
||||
let _ = proto.set_proto(et_proto_val);
|
||||
|
||||
// 原型方法:postMessage / close(每方法先 lookup_position 守卫)。
|
||||
let si_post_message = sf.intern("postMessage").0;
|
||||
|
||||
Reference in New Issue
Block a user