Rework deprecated <element> to JavaScript API, thanks @addyosmani