New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
window.orientation missing from Dart #15230
Comments
This comment was originally written by tommytech...@gmail.com Going to: http://fiddle.jshell.net/rq95F/show/ |
So this API exists in Chrome for Mobile but not Chrome for Desktop? |
In the meantime, should be able to access this on mobile via JS interop. |
Removed Area-HTML label. |
This is present in 1.8. It returns null on Firefox and Safari, but they don't support it. Added AssumedStale label. |
This issue was originally filed by tommytech199...@gmail.com
While writing a switch in dart calling the window.orientation as the switch's argument,the Dart Editor gives the warning 'there is no such getter 'orientation' in 'Window'' and gives the breaking exception, 'Class 'Window' has no instance getter 'orientation'' Because of this, switches that depend on getting the orientation of window for example this basic one:
switch(window.orientation) {
case 0:
//code here
break;
case -90:
//device is in right orientation code
break;
case 90:
//code for a device that is flipped left
break;
case 180:
//code for a device with orientation flipped
break;
}
will result in the Dart Editor giving the warning even though window.orientation is at this time supported by Blink.
The text was updated successfully, but these errors were encountered: