%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<!doctype html> <meta charset="utf-8"> <title>event.timeStamp is initialized using event's relevant global object</title> <link rel="help" href="https://dom.spec.whatwg.org/#ref-for-dom-event-timestamp%E2%91%A1"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> <script> const t = async_test(); t.step_timeout(() => { const iframeDelayed = document.createElement("iframe"); iframeDelayed.onload = t.step_func_done(() => { // Use eval() to eliminate false-positive test result for WebKit builds before r280256, // which invoked WebIDL accessors in context of lexical (caller) global object. const timeStampExpected = iframeDelayed.contentWindow.eval(`new Event("foo").timeStamp`); const eventDelayed = new iframeDelayed.contentWindow.Event("foo"); const {get} = Object.getOwnPropertyDescriptor(Event.prototype, "timeStamp"); assert_approx_equals(get.call(eventDelayed), timeStampExpected, 5, "via Object.getOwnPropertyDescriptor"); Object.setPrototypeOf(eventDelayed, Event.prototype); assert_approx_equals(eventDelayed.timeStamp, timeStampExpected, 5, "via Object.setPrototypeOf"); }); document.body.append(iframeDelayed); }, 1000); </script>