0

I got my html document with the <html> tag, I want to dynamically insert stuff into that tag like

<html xmlns:fb="...">.

The reason for this is that I'm not allowed to touch the main file but am allowed to adjust it from within another file... Is this possible and how would I do it?

1 Answer 1

2

Of course it's possible. document.documentElement is your <html> tag, and just use setAttribute (or setAttributeNS) on it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.