Appends a new HTMLElement as the last child to an existing element.
appendNew(name, attrlist)Simple example:
let foo = document.getElementById('foo'); foo.appendNew('div');
Example with attributes:
document.getElementById('foo') .appendNew('a', { 'href': 'http://code.kolmio.com/jmini/', 'class': 'bar', 'target': '_blank', 'hreflang': 'en' } );
Note: This function relies on HTMLElement.new() for creating the new element. Please see there for more examples.