Cross-browser HTMLElement API