fix(touch): derive event conversion and protect native lists

This commit is contained in:
ldm0
2026-11-20 22:47:49 +08:00
parent 061551f230
commit 0f3ceecc0f
@@ -1,5 +1,6 @@
(() => {
const NativeObject = Object;
const arrayIteratorPrototype=NativeObject.getPrototypeOf([][Symbol.iterator]());
const names = ['Event','UIEvent','KeyboardEvent','MouseEvent','PointerEvent','WheelEvent',
'DragEvent','TouchEvent','Touch','TouchList','FocusEvent','InputEvent','ClipboardEvent',
'SubmitEvent','CommandEvent','ToggleEvent','InterestEvent','TrackEvent'];
@@ -66,6 +67,7 @@
for(let i=0;i<members.length;i++)savePoison(NativeObject.prototype,members[i],{configurable:true,get:poison});
savePoison(NativeObject.prototype,'0',{configurable:true,set:poison});
savePoison(Array.prototype,Symbol.iterator,{configurable:true,get:poison});
savePoison(arrayIteratorPrototype,'next',{configurable:true,get:poison});
savePoison(globalThis,'Object',{configurable:true,get:poison});
};
globalThis.readNativeEventProducerProbe=()=>{