DOM update 2025/01/16
DRANK

Fixes #60985 Changes: ImageDecoder and ImageTrack added NavigationActivation and NavigationHistory added PageReveal and PageSwap events added ViewTransitionTypeSet added non-existent instance method AbortSignal#any is deleted. Static method AbortSignal.any remains. many new properties on RTC stats types one new ARIAMixin property CSS*Rule types now include media and style accessors. New CSSNestedDeclarations (nothing but a style accessor) New CSSViewTransitionRule CSSStyleDeclaration new properties textBox textBoxEdge textBoxTrim viewTransitionClass Document.location and Window.location now has stricter get/set types: get location(): Location is unchanged set location(href: string) previously allowed Location (probably because of Typescript's accessor assignability rules) AnimationEvent is now deprecated Document.write is now deprecated Element adds classList, part, style accessors New type GPUError with one property message HTML*Element adds various new accessors Same for SVG*Element HTMLBlobElement.toBlob/toDataURL require number for their last parameters, not any New base type for MessagePortEventMap: MessageEventTargetEventMap MessagePort and Worker extend new type MessageEventTarget which now has MessagePort/Worker's onmessage/onmessageerror methods SubtleCrypto.generateKey's algorithm parameter now accepts both "Ed25519" and { name: "Ed25519" } PermissionName union now includes "camera" and "microphone" several other new unions DT errors: several shims need updating: webrtc, dom-webcodecs, dom-navigation Worker.onmessage's this parameter is less specific: MessageEventTarget not Worker: rusha Notes: This sounds incorrect so I'm going to check. 5 top400 projects failed with the same problem, including vscode. MDN agrees that it should still be a MessageEvent. WhatWG shows that MessagePort includes MessageEventTarget, and although MessageEventTarget.onmessage is typed EventHandler in the IDL snippet, it also has an additional table giving "Event handler event type" for onmessage as message which has type MessageEvent. I think the IDL must incorrectly drop this. Yep. There are existing overrides in Worker and MessagePort that didn't get moved when their events got refactored to MessageEventTarget.

github.com
Related Topics: TypeScript
2 comments