Message from JavaScript discussions

July 2017

— No, its resulted as

Uncaught TypeError: Cannot set property 'textContent' of null

— 

The official guide write it as

  var page = event.target;

and
  } else if (page.id === 'page2') {

    page.querySelector('ons-toolbar .center').innerHTML = page.data.title;

  }

any have idea with it TRGWII ?

— That's weird...

— Looks like som old IE way of doing it

— Where does the event variable come from?

— Which one? that var page = event.target; ?

— Yeah

— What is event?

— Where is it coming from?

— I doesn't understand too, they write it like that in their web...
maybe their framework ?

— From this https://onsen.io/v2/api/js/ons-navigator.html

— MIGHT be the result from the event listener function