javascript - How to get HTML element similar to getting BODY with document.body? -


I know there is a way to do this, but how can I not remember?

How can I go about grabbing the HTML element (top-most element DOM) using plain javascript?

Use document.documentElement .

View Docs:

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -