All notable changes to this project will be documented in this file. This project does its best to adhere to Semantic Versioning.
0.11.0 - 2022-01-02
- Update to TypeScript 4.4
0.10.0 - 2021-06-12
- Update to TypeScript 4.3
0.9.0 - 2021-01-01
- BREAKING: Added
DomValidate.missingAttribute()
interface method - implementations will need to add this - A lot of
dom-builder.d.ts
documentation forDomBuilderHelper
- Added optional 'parent' argument to
DomValidate.missingNode()
NodeLike.removeChild()
- DomLite
ElemLite
now implementsfirstChild
,lastChild
, andremoveChild()
BuilderHelper
interface changes andDomBuilderHelper
implementation changes:- BREAKING:
getChilds()
split and renamed intogetChildren()
andgetChildNodes()
- BREAKING:
getNodeAttrs()
renamedgetAttrs()
- BREAKING:
removeNodeAttr()
renamedremoveAttr()
- BREAKING:
getNodeAttr*[Int|Float|Bool|String]()
methods renamedgetAttr*()
(i.e.getNodeAttrInt()
is nowgetAttrInt()
) - Simplify
getAttrs()
overload signature attr*()
andgetAttr*()
methods have a new optionalthrowIfMissing
argumentqueryOneChild()
now correctly returnsT | null
addChilds()
andremoveChilds()
expanded to acceptNodeLike
andNode
instead ofElementLike
andElement
- BREAKING:
DomBuilder
element
is no longer a getter but a public field, can be set. SinceDomBuilder
has no other internal state besidesdom
, changing theelement
value should be safe.
0.8.0 - 2020-09-04
- Update to TypeScript 4.0
0.7.2 - 2019-11-08
- Update to TypeScript 3.7
0.7.1 - 2019-07-05
- Update to TypeScript 3.5 and fixed missing lib.dom.d.ts NodeSelector type
0.7.0 - 2019-05-24
- ElementLike
setAttribute()
andsetAttributeNS()
- DomBuilderHelper
attr*()
functions first parameter changed fromattrs: NamedNodeMap
toelem: ElementLike
to allow setAttribute() to be used instead of setNamedItem() (setNamedItem() does not preserve the namespace prefix in some DOM implementations)
0.6.5 - 2019-05-24
- Fix attribute creation to use createAttributeNS() for attribute names containing a namespace prefix followed by
:
0.6.4 - 2018-12-29
- Update to TypeScript 3.2 and fix compile errors
- Update @types dependencies
0.6.3 - 2018-10-16
- Update to TypeScript 3.1
- Update dev dependencies and @types
- Enable
tsconfig.json
strict
and fix compile errors - Removed compiled bin tarball in favor of git tags
0.6.2 - 2018-04-08
- Added tarball and package.json npm script
build-package
reference for creating tarball
0.6.1 - 2018-03-31
- Update tsconfig.json with
noImplicitReturns: true
andforceConsistentCasingInFileNames: true
0.6.0 - 2018-03-29
- Update to TypeScript 2.8 and fixes for Element and Document to be assignable to ElementLike and DocumentLike
0.5.2 - 2018-02-27
- Update to TypeScript 2.7
0.5.1 - 2018-02-11
- Update
package.json
dependencies - update chai, mocha, and node
0.5.0 - 2017-11-16
package.json
addedstrictNullChecks
and fixed code to handle nullable types- added/improved unit tests
0.4.1 - 2017-08-11
- Update to TypeScript 2.4
0.4.0 - 2017-07-12
- Renamed DomBuilder.class() to classes() (meant to include in 0.3.0)
0.3.0 - 2017-07-12
- DomLite a very basic virtual DOM implementation, currently only partially implements 'id', 'nodeName', 'attribute', 'childNodes', 'classList', and 'style' Element properties. The bare minimum needed to meet the needs of libraries like xlsx-spec-utils and xlsx-spec-models.
- Added first unit tests for DomLite and DomBuilderHelper using chai & mocha
- Updated README
- Extensive dom-builder interface changes
- Nearly all DOM types like Node, Element, and HTMLElement have been replaced with '-Like' interfaces such as
DocumentLike
andElementLike
- DomBuilder class now takes two generic parameters, the element type and document type
- DomBuilderFactory.newLink takes a 'doc' parameter
- DomBuilderHelper.getNodeAttr*() methods 'ifNullReturnNull' parameter changed to 'defaultValue'; i.e. signature looks like getNodeAttrInt(elem, attrName, [defaultValue])
- DomBuilderHelper.getNodeAttrBool() not parsing false attributes properly
0.2.1 - 2017-05-08
- Expanded DomBuilderFactory.create() to use HTMLElementTagNameMap for all HTML element types/names
- DomBuilder.addChild() now supports adding DomBuilders in addition to HTML elements
0.2.0 - 2017-01-28
- Added method expectNode() to DomValidate interface
- DomBuilder internal changes to make extending it easier
0.1.1 - 2016-12-30
- TypeScript 2.0 compatibility
0.1.0 - 2016-04-28
Initial code commit, included in /dom/ directory:
- dom-builder.d.ts - interfaces for this module
- DomBuilder.ts - the main DOM builder API, wraps and element (accessible vial the 'element' property) and provides helper functions like class(), style(), attrs(), etc. to setup an element
- DomBuilderFactory.ts - a factory that wraps a 'Document' object (i.e. window.document) and provides a quick create() function instead manually creating DomBuilder instances
- DomBuilderHelper.ts - a helper that wraps a 'Document' object and provides functions like attrFloat(), attrString(), queryAllChilds() and removeChilds()
- Renamed project from ts-dom-builder -> dom-builder