Skip to content

v2.1.1 - Fixed css and get / add prop and removeAttr

Choose a tag to compare

@k37z3r k37z3r released this 22 Feb 17:25
· 28 commits to main since this release
a318705

🚀 Added (DOM Attributes)

  • Attributes Module (dom/attributes.ts): Added removeAttr() method to safely remove HTML attributes from all elements in a selection.
  • Attributes Module (dom/attributes.ts): Added prop() method for getting and setting underlying DOM properties (e.g., checked, disabled, selectedIndex) that don't directly map to standard HTML attributes.

🛡️ Fixed (CSS & HTTP)

  • CSS Module (css/styles.ts): Enhanced the css() method to support passing an object (Record<string, string | number>) for setting multiple CSS properties simultaneously (e.g., css({'background-color': 'blue', 'font-size': '14px'})).
  • CSS Module (css/styles.ts): Improved handling of kebab-case property names inside the css() method by utilizing style.setProperty() for greater robustness.
  • HTTP Module (http/get.ts): Fixed a critical bug in getText() where it incorrectly attempted to parse the response with JSON.parse() instead of returning the raw text. It now safely returns the raw string/HTML as intended.