Skip to content

1.2.0

Choose a tag to compare

@FlorianRappl FlorianRappl released this 06 Nov 10:09
· 14 commits to main since this release
e1fad2a

Released on Friday, November 6 2026.

What's Changed

  • Fixed window.origin being null for a frame without an address of its own instead of the origin of its creator
  • Fixed text given to append, prepend and the like failing instead of becoming a text node
  • Fixed a class deriving from a type of the DOM not having its instances on its prototype chain
  • Fixed an object with handleEvent not being accepted as an event listener, or one with acceptNode as a filter of a TreeWalker or NodeIterator
  • Fixed a function not being accepted as a callback whose result is waited for, e.g. of navigator.locks.request: it runs on the event loop and is followed to its promise
  • Fixed promise jobs not running after a timer, a listener or any other callback of the host: they waited for something else to run them, so await could hang
  • Fixed a DOMException with a name having no code (e.g. NotAllowedError) being named Error for script
  • Fixed a date from the DOM not being a Date for script, and bytes not surviving a structured clone
  • Fixed a function not being accepted as a callback with a result, e.g. as a filter of a TreeWalker
  • Fixed a worker that failed to start throwing from postMessage instead of firing an error event
  • Fixed collections from attributes, e.g. document.links or element.children, not being iterable
  • Fixed classList not being iterable and having no forEach, entries, keys and values
  • Fixed a member of an options dictionary without a default becoming undefined in text
  • Fixed members of the DOM being read-only and copied onto every prototype, so polyfills could neither replace them nor reach derived types (e.g. patching Element.prototype.querySelector): each is now on the prototype of the interface declaring it, as WebIDL says (writable, enumerable and configurable)
  • Fixed interface objects of the window being read-only and enumerable: window.Node = ... now also changes Node, as WebIDL says
  • Fixed bound functions and callable proxies not being accepted as callbacks (e.g. setTimeout(f.bind(x)), addEventListener('click', f.bind(x)), requestAnimationFrame(f.bind(x)), onclick), failing with Could not find corresponding cast target
  • Fixed removeEventListener not removing listeners, as a function was turned into another listener each time
  • Fixed errors of event listeners not reaching the error listeners of the window; an error thrown by such a listener goes to the browsing context
  • Fixed the address of a script getting lost, so errors and stack traces named <anonymous>: they tell the resolved address of the script, or of the document for one written into it
  • Fixed scripts written into a document telling lines and columns of their own in errors and stack traces instead of the ones in the document
  • Fixed errors of scripts and of callbacks (e.g. timers, animation frames) not reaching the error listeners of the window; what they don't handle by preventDefault goes to the browsing context
  • Fixed onerror of the window getting the event instead of the message, source, line, column and error, and returning true not handling the error
  • Fixed error of an ErrorEvent being a .NET exception instead of what script threw
  • Fixed an onclick and the like throwing taking down the process and skipping the other listeners, as it was not reported like a listener
  • Fixed a TypeError or the like thrown for script by a member of the DOM becoming a plain Error
  • Fixed modules being read from the local disk; every module is loaded through the configured requesters (#153) @michaelthyregod
  • Fixed modules imported by a relative address being requested from the wrong address (e.g. ./a.js of /dir/page.html from /dir/page.html/a.js, and the imports of a module of another origin from the own origin); they are resolved against what imports them (#153) @michaelthyregod
  • Fixed modules being known by the path of their address, so errors didn't tell the whole address, and imports of an imported module were looked for from the wrong place
  • Fixed a module written into a document telling lines and columns of its own, and importing from somewhere other than the base address of the document
  • Fixed an error of a module being reported twice
  • Fixed an event handler (e.g. onclick) returning false not cancelling the event
  • Fixed an event handler attribute being added on top of the previous one when it changed, staying when it was removed, and throwing a syntax error at whoever set the attribute instead of reporting it
  • Fixed only the first of several methods or constructors of the same name being callable (e.g. new URLSearchParams('a=1'), register(url, options)); the one fitting the arguments is called
  • Fixed static members not being reachable (e.g. DOMRect.fromRect); they are on the constructor and may take the window as first parameter
  • Fixed members of classes marked with DomExposed ending up on what they are exposed to (e.g. the members of a constructor on window); only extension methods do
  • Fixed arrays and other iterables not converting to sequences (arrays and the interfaces they implement)
  • Fixed ArrayBuffer, typed arrays, and DataView not converting to Byte[], ArraySegment<Byte>, and Object (e.g. a request body being sent as [object Uint8Array])
  • Fixed numbers not converting from and to Int64, UInt64, Int16, Byte, SByte, Single (only from), and Decimal, as well as nullable forms of all value types
  • Fixed values of DomLiterals enums being numbers instead of strings (e.g. shadowRoot.mode), and such enums being exposed as objects
  • Fixed Byte[] being given as an array of numbers instead of an ArrayBuffer
  • Fixed errors thrown by constructors losing their message
  • Fixed WebIDL stringifiers (URL, URLSearchParams, Location, Range, DOMTokenList, DOMMatrix) answering String(x) with [object X]; a type overriding ToString has a toString
  • Fixed sandboxed browsing contexts without allow-scripts running scripts and event handler attributes
  • Fixed postMessage ignoring targetOrigin, giving it as the origin of the event, turning objects into strings, and not having a source; messages are copied by the structured clone algorithm, and the options form is supported
  • Added clearResourceTimings and setResourceTimingBufferSize to performance
  • Added { type: 'module' } and onerror to Worker, with imports being loaded by the worker
  • Added MessageChannel with queued message delivery, structured cloning, and transferable ports for windows and workers
  • Added IScriptValueCloner, so that values of script can be kept, e.g. by IndexedDB
  • Added structuredClone, origin, isSecureContext and length to the window
  • Added DOMException, which is what the DOM now throws for scripts: an Error with the name and code of the standard, also available as a constructor and with its constants
  • Added TextEncoder and TextDecoder
  • Added the iterator of a type giving entries (WebIDL iterable<K, V>), so that e.g. for (const [k, v] of new URLSearchParams(s)) works
  • Added overloads brought by extensions for the methods of the DOM, as addEventListener with options has them
  • Added crypto with getRandomValues and randomUUID, but without subtle
  • Added requestIdleCallback and cancelIdleCallback
  • Fixed DOMParser replacing the document of the page with what it parsed, and running its scripts
  • Added PerformanceObserver, for the marks and measures of performance
  • Added custom elements, run for the registry of AngleSharp: classes deriving from HTMLElement or another element, with their callbacks running when the call of a script returns (requires AngleSharp 1.10)
  • Fixed classes deriving from a DOM type taking every object of that type for an instance of them
  • Added what a promise rejects with being a DOMException or what was thrown, if the task behind it failed with one
  • Added import.meta.url to modules; without it, e.g., webpack stopped with Automatic publicPath is not supported in this browser
  • Added ArraySegment<Byte> being given as a Uint8Array
  • Added classes with implicit conversions standing for a WebIDL union, e.g. of a string and a sequence of strings, which fixes such conversions failing; an implicit conversion from such a class is what a script receives for it
  • Added the same-origin policy: script gets null for a node of another origin, and for its window a CrossOriginWindow with only window, self, frames, parent, top, closed, length, location (only to be set, and only for frames inside the own document), postMessage, focus, blur and close
  • Added performance.mark, measure, getEntries, getEntriesByName, getEntriesByType, clearMarks, clearMeasures, along with PerformanceEntry, PerformanceMark and PerformanceMeasure
  • Released 1.2.0 by @FlorianRappl in #154

New Contributors

Full Changelog: v1.1.4...v1.2.0