Files
WRNexusJS/FIXES-0.7.0-R5-HAPPY-DOM-ELEMENT-EVENT-TYPES.md
T
2026-08-01 10:04:42 +05:30

838 B

WRNexusJS 0.7.0 R5 — Happy DOM element/event type alignment

Problem

R4 returned Happy DOM Event objects from the test helper, but two inputs were still cast to the browser DOM HTMLInputElement type. TypeScript therefore rejected the Happy DOM event at dispatchEvent().

Correction

packages/validation/test/validation.test.ts now imports and consistently uses Happy DOM types for:

  • Event
  • IEventInit
  • HTMLElement
  • HTMLInputElement
  • HTMLFormElement

The input, field, error and form nodes no longer use browser DOM global casts. Submit events also no longer cast back to the browser DOM Event type.

Regression gate

validate:0.7 now verifies that the validation tests use one Happy DOM type system and rejects the old as unknown as HTMLInputElement, HTMLFormElement, or HTMLElement casts.