changelogs.md


teamworkguy2/dom-builder

Repository  -  API  -  Source

0.10.0

June 12, 2021

Changed

  • Update to TypeScript 4.3

0.9.0

January 1, 2021

Added

  • BREAKING: Added DomValidate.missingAttribute() interface method - implementations will need to add this
  • A lot of dom-builder.d.ts documentation for DomBuilderHelper
  • Added optional 'parent' argument to DomValidate.missingNode()
  • NodeLike.removeChild()
  • DomLite ElemLite now implements firstChild, lastChild, and removeChild()

Changed

  • BuilderHelper interface changes and DomBuilderHelper implementation changes:
    • BREAKING: getChilds() split and renamed into getChildren() and getChildNodes()
    • BREAKING: getNodeAttrs() renamed getAttrs()
    • BREAKING: removeNodeAttr() renamed removeAttr()
    • BREAKING: getNodeAttr*[Int|Float|Bool|String]() methods renamed getAttr*() (i.e. getNodeAttrInt() is now getAttrInt())
    • Simplify getAttrs() overload signature
    • attr*() and getAttr*() methods have a new optional throwIfMissing argument
    • queryOneChild() now correctly returns T | null
    • addChilds() and removeChilds() expanded to accept NodeLike and Node instead of ElementLike and Element
  • DomBuilder element is no longer a getter but a public field, can be set. Since DomBuilder has no other internal state besides dom, changing the element value should be safe.

0.8.0

September 4, 2020

Changed

  • Update to TypeScript 4.0

0.7.2

November 8, 2019

Changed

  • Update to TypeScript 3.7

0.7.1

July 5, 2019

Changed

  • Update to TypeScript 3.5 and fixed missing lib.dom.d.ts NodeSelector type

0.7.0

May 24, 2019

Added

  • ElementLike setAttribute() and setAttributeNS()

Changed

  • DomBuilderHelper attr*() functions first parameter changed from attrs: NamedNodeMap to elem: ElementLike to allow setAttribute() to be used instead of setNamedItem() (setNamedItem() does not preserve the namespace prefix in some DOM implementations)

0.6.5

May 24, 2019

Fixed

  • Fix attribute creation to use createAttributeNS() for attribute names containing a namespace prefix followed by :

0.6.4

December 29, 2018

Changed

  • Update to TypeScript 3.2 and fix compile errors
  • Update @types dependencies

0.6.3

October 16, 2018

Changed

  • 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

April 8, 2018

Changed

  • Added tarball and package.json npm script build-package reference for creating tarball

0.6.1

March 31, 2018

Changed

  • Update tsconfig.json with noImplicitReturns: true and forceConsistentCasingInFileNames: true

0.6.0

March 29, 2018

Changed

  • Update to TypeScript 2.8 and fixes for Element and Document to be assignable to ElementLike and DocumentLike

0.5.2

February 27, 2018

Changed

  • Update to TypeScript 2.7

0.5.1

February 11, 2018

Changed

  • Update package.json dependencies - update chai, mocha, and node

0.5.0

November 16, 2017

Changed

  • package.json added strictNullChecks and fixed code to handle nullable types
  • added/improved unit tests

0.4.1

August 11, 2017

Changed

  • Update to TypeScript 2.4

0.4.0

July 12, 2017

Changed

  • Renamed DomBuilder.class() to classes() (meant to include in 0.3.0)

0.3.0

July 12, 2017

Added

  • 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

Changed

  • Extensive dom-builder interface changes
  • Nearly all DOM types like Node, Element, and HTMLElement have been replaced with '-Like' interfaces such as DocumentLike and ElementLike
  • 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])

Fixed

  • DomBuilderHelper.getNodeAttrBool() not parsing false attributes properly

0.2.1

May 8, 2017

Changed

  • 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

January 28, 2017

Changed

  • Added method expectNode() to DomValidate interface
  • DomBuilder internal changes to make extending it easier

0.1.1

December 30, 2016

Changed

  • TypeScript 2.0 compatibility

0.1.0

April 28, 2016

Added

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()

Changed

  • Renamed project from ts-dom-builder -> dom-builder