$w('Page') issues with Chrome et al

Anyone? I will make it even simpler:

let documentElementIds = $w("Document").children;
console.log(documentElementIds);

let pageElementIds = $w('#page1').children;
console.log(pageElementIds);

Why does this code produce the following errors in Chrome but not Firefox?

Is there another way to compile an array of specific page elements that does not use the obviously broken code above?