Because the js
command scope is XUL Chrome scope. That is the global object window
this a XUL Window. The html window object for seleted tab is window.content.window
.
So try to change your code to
js window.content.window.document.getElementById("myDiv").style.color="blue";