Two possible workarounds:
1) Use the "Web-Console".
The "Web-Console" (CtrlShiftK instead of the "Browser-Console" CtrlShiftJ) shows the expected output.
2) Disable "e10s" multiprocessor support:
- about:config
- browser.tabs.remote.autostart = False
The Browser-Console will show the expected output if e10s is disabled.
Recap (02.01.2018):
The problem still persists in FF 64.0:
in general, objects will be shown as "unavailable" in the Browser-Console.
To reproduce (e10s enabled):
<html><head>
<script type="text/javascript">
console.log( 'test' );
console.log( 123 );
console.log( [ 1, 2, 3 ] );
console.log( { x: 'x' } );
console.log( document.getElementById('myDiv') );
window.onload = function() {
console.log( document.getElementById('myDiv') );
};
</script>
</head><body>
<div id="myDiv"></div>
</body></html>
Output in Browser-Console (wrong output):
test
123
<unavailable>
<unavailable>
null
<unavailable>
Output in Web-Console (as expected):
test
123
Array(3) [ 1, 2, 3 ]
Object { x: "x" }
null
<div id="myDiv">
See also:
https://bugzilla.mozilla.org/show_bug.cgi?id=1136995