Document-createEvent-touchevent.window.js (485B)
1 for (const variant of ['TouchEvent', 'touchevent', 'TOUCHEVENT']) { 2 test(() => { 3 if (!('ontouchstart' in document)) { 4 assert_throws_dom("NOT_SUPPORTED_ERR", () => { 5 document.createEvent(variant); 6 }); 7 } else { 8 document.createEvent(variant); 9 // The interface and other details of the event is tested in Document-createEvent.https.html 10 } 11 }, `document.createEvent('${variant}') should throw if 'expose legacy touch event APIs' is false`); 12 }