update dom when element added vanilla javascript code example Example: javascript es6 dom manipulation myElement.matches('div.bar') === true