Screen size on WebGl

How can I get screen size when running on WebGl?
I have 1200x800 canvas.
Screen.width returns 300 in browser and 1200 in editor. Screen.currentResolution is also wrong.
This happens in WebGl on desktop and mobile browsers.

Is there any reliable way to get screen size in pixels when running on WebGl?

Found a solution:

It appears that Screen.width is just wrong on Awake(). I tried getting it in Update() and Start() and now it works fine.