diff --git a/.eslintrc.json b/.eslintrc.json index ed14090..0d7cb97 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -31,7 +31,8 @@ "no-prototype-builtins": 0 }, "globals": { - "globalThis": "readonly" + "globalThis": "readonly", + "MathMLElement": "readonly" } } diff --git a/CHANGELOG.md b/CHANGELOG.md index d2efdf5..57f454e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.0.3] - 2024-03-29 + +### Added +- Add support for parsing HTML Documents using `Document.parseHTML()` +- Add function to parse just a single HTML Element +- Add support in HTML parser for working with arrays and `NodeList`s, etc + +### Changed +- Update README + ## [Unreleased] ## [v0.0.2] - 2024-03-28 diff --git a/README.md b/README.md index 9c343b7..1b87746 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,28 @@ A collection of secure & minimal parsers for HTML, CSS, SVG, MathML, XML, and JS - [Contributing](./.github/CONTRIBUTING.md) +## Benefits + +- **Lightweight**: (6.4Kb gzipped): Keeps your bundle size small and load times down +- [**Convenient**](#a-quick-example): Easily compose elements, styles, & icons using tagged template literals +- [**XSS Protection**](#examples-of-attacks-protected-against): Built-in sanitization mitigates XSS vulnerabilities +- [**Reusable Components**](#reusable-components-and-styles): Create secure & reusable UI components (or modules) with ease +- [**No Framework Required**](#no-framework-required): Works even without a client-side framework +- [**Customizable**](#advanced-usage-with-custom-sanitizer-config): Supports your own custom lists of tags and attributes +- [**Compatible with Strict CSP & Trusted Types**](#content-security-policy-and-trustedtypespolicy): Does not conflict with other security best practices + ## What is This? -This is a lightweight (as little as 6.3Kb, minified and gzipped) library for parsing +This is a lightweight (as little as 6.4Kb, minified and gzipped) library for parsing various kinds of content using [tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates). It makes creating UI components, icons, and stylesheets easy, more secure, and reusable. No framework required, though it should be compatible with any client-side framework (no SSR - unless a full DOM implementation is provided). -It also sanitizes inputs to protect against XSS attacks, much like DOMPuriy. It -provides a safer alternative to `innerHTML` and using `