Exception: Dommy::Bridge::TypeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dommy/bridge.rb

Overview

A Ruby-side signal that the JS boundary should surface a JS TypeError (not a DOMException). Some WebIDL operations — notably the URL constructor and its href setter — throw TypeError on failure rather than a DOMException; raising this lets a host bridge rethrow the correct JS error type, while Ruby callers can still rescue it like any other error. Kept distinct from Ruby's built-in ::TypeError so a host can map only deliberate, spec-mandated TypeErrors (and not mask genuine Ruby type bugs) across the boundary.