How to deal with device orientation / different screen ratios

Hello,
please excuse my potential ignorance.
I used to be a flash/air and objective-c game programmer before and the js/html approach is still quite new to me.
I need to re-do some simple games i made in flash a couple of years ago.
All of these games where basically fixed to landscape mode due to the fact, that they ran in an exhibition on a small screen which had a 16:9 ratio.

Now the client wants to release them into the wild by making them accessible inside a html-page.

My question:
Since I could not find an orientation-Event Handler in the JS-Api, do I have to write the whole thing in “plain” javascript and then set flags / call methods within my application?

How do you guys deal with the issue normally?

Thanks a lot for any input.

1 Like

I would also like to know how to set the device resolution to portrait in cocos-2d-x JS. The instructions found here apply to C++ cocos 2d-x and are confusing. Any help would be great!