Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Message: document.write is disallowed in JSFiddle

When I try to run one of my JavaScript files on JSFiddle, I get the following error message:

document.write is disallowed in JSFiddle environment and might break your fiddle.

How do I fix this issue?

Note: When I use external resources, it works fine. But I want to use the JavaScript panel for scripts.

like image 477
Nishantha Avatar asked May 28 '13 04:05

Nishantha


1 Answers

Here's one alternative: http://jsfiddle.net/skibulk/erh7m9og/1/

document.write = function (str) {
    document.body.insertAdjacentHTML("beforeend", str);
}

document.write("¡hola mundo");
like image 173
skibulk Avatar answered Sep 21 '22 04:09

skibulk