Allows for widget to be constructed from native dom element.