Skip to content

Releases: rafaucau/ts-dom-utils

v2.3.1

26 Feb 21:16
a7b82fa

Choose a tag to compare

Patch Changes

  • 575a6b9: Fix module and types resolution by adding the "exports" field to package.json. This ensures that correct types (.d.ts for ESM and .d.cts for CJS) and module formats are loaded depending on the environment and import method (import vs require), fixing compatibility with modern Node.js and strict bundler configurations.

v2.3.0

26 Feb 19:31
fd47a5f

Choose a tag to compare

Minor Changes

  • 5880a7b: Add HTML, SVG, and MathML tag name overloads for qs and qsa, enabling automatic type inference for tag selectors (e.g. qs('div') returns HTMLDivElement | null)
  • a0f525e: Add typed aria-* and data-* custom attribute support in CreateElementOptions
  • c69b5e4: Added on option to createElement for attaching event listeners. Supports a plain handler or an object with handler and options (e.g. once, passive).

v2.2.1

26 Feb 15:53

Choose a tag to compare

Patch Changes

  • Fix typo in aria-expanded attribute in createElement example
  • Update publish workflow to use OpenID Connect
  • Update dependencies

Full Changelog: v2.2.0...v2.2.1

v2.2.0

22 Nov 20:39

Choose a tag to compare

Minor Changes

3f66d1e:

  • Simplified createElement to handle all object properties, including style.
  • Fixed issue with styles not applying correctly.
  • Updated style type in SpecialAttributes to Partial<CSSStyleDeclaration> for editor hints and flexibility.

v2.1.0

22 Sep 18:46

Choose a tag to compare

Fixes

  • Type Definitions: Corrected and improved type definitions for the createElement function. The function now uses TypeScript's built-in types for DOM elements, providing better type inference and editor support.

image
image

v2.0.0

02 Jul 21:31

Choose a tag to compare

  • Breaking Change: DOMisReady has been updated to be a function that accepts a Document object as an argument. This is a breaking change from version 1.0.0 where DOMisReady was a promise object. This change allows users to check the readiness of any document, such as an iframe's content document. Please update your usage of DOMisReady accordingly.

Old Usage:

// using then
DOMisReady.then(() => {
  // DOM manipulation code here
});

// using async/await
(async function() {
  await DOMisReady;
  // DOM manipulation code here
})();

New Usage:

// using then
DOMisReady().then(() => {
  // DOM manipulation code here
});

// using async/await
(async function() {
  await DOMisReady();
  // DOM manipulation code here
})();
  • Documentation has been updated
  • Dependencies have been updated

Full Changelog: v1.1.0...v2.0.0

v1.1.0 - DOMisReady util

26 May 19:02

Choose a tag to compare

docs: Update info

v1.0.1

26 May 18:32

Choose a tag to compare

Exclusion of unnecessary files

v1.0.0 - Initial release

26 May 18:03

Choose a tag to compare

docs: Add divider