So if I want to make a change, for example in this page (stackoverflow.com), using:
javascript:document.getElementById("hlogo").innerHTML = "10";
The page goes blank, only showing the string "10", even though the source code is still there.
Yet if I do this in an HTML document internally via the JavaScript console it doesn't remove the rest of the content visually.
Append a
void(0)
or any expression returning an undefined value:This answer explains this behavior well: https://stackoverflow.com/a/1291950/689788