jeudi 2 août 2018

What's the javascript event of window rotate or toggle different device?

I was browsing to a webste with Chrome, I turned on the Inspect ( Ctrl + Shift + I ) and then I was trying to trace what javascript chart library it's using.

But I find out when I click the "Toggle Device Tollar" and switch to the mobile mode (vice versa) or press rorate when on mobile mode .

The website knows those behaviors and reload whole page. Not just responsive CSS but actually re-request the whole page such as the behavior of presssing F5 on the web page.

I was trying to find the javascript event to know how it detect these behaviors(toggle on device and rorate) and do reload, but I couldn't find it via break point in the Chrome dugger.

Any ideas how this website makes it?

before pressing "toggle device toolbar" enter image description here

after pressing "toggle device toolbar" enter image description here




Aucun commentaire:

Enregistrer un commentaire