|
|
|
|
|
by bsimpson
4905 days ago
|
|
I wouldn't ever think of `document.write` as 'safe.' If it happens to be called after the DOM is ready, you'll purge the DOM and blank the page. document.write can be useful for dynamically inlining new <script> tags in a way that older versions of IE are kosher with (which is why it's common in advertising), but in almost every other case, using the W3C DOM methods (or innerHTML) is a better decision. |
|