Unreachable in Firefox Console

I have several div s class='class_name', and also declared

var A = document.getElementsByClassName('class_name');
console.log(A[0]);

Chrome console shows:

<div class="class_name"> div 1 </div>

Firefox console shows:

<unavailable>

What is the problem or what is the possible cause otherwise?

+11
source share
2 answers

There are currently four solutions:

  1. Use console.log(JSON.stringify(variable, null, 4))instead console.info(variable). This has the additional advantage of detecting errors caused by memory management errors of any type, but this can cause cyclic redundancy of real elements when interpolating parent / child elements. Original solution from me.

  2. - Firefox (control+shift+K Tools->Web Developer->Web Console) Firefox (control+shift+J Tools->Web Developer->Browser Console). Panos Astithas !

  3. e10s FF. about:config Firefox browser.tabs.remote.autostart loop.remote.autostart false. Janekptacijarabaci !

  4. FireFox Quantum. Firefox 57 59 ("Firefox Quantum"), Firefox 56.0.2. . : https://ftp.mozilla.org/pub/firefox/releases/56.0.2/ .

Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1136995

: Firefox v. 59.0.2 v. 59.0.3.

+5

:

1) "-".
"-" ( "-") .

2) "e10s":

- about:config
- browser.tabs.remote.autostart = False

Browser-Console , e10s .

(02.01.2018):

FF 64.0:
"" -.

(e10s ):

<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>

Browser-Console ( ):

test
123
<unavailable>
<unavailable>
null
<unavailable>

- ( ):

test
123
Array(3) [ 1, 2, 3 ]
Object { x: "x" }
null
<div id="myDiv">

: https://bugzilla.mozilla.org/show_bug.cgi?id=1136995

+5

All Articles