0

Is there an "Angular/Dart" way to detect older unsupported browsers and prevent to continue with an elegant message (there are plenty of examples using javascript) rather than continue and show a weird layout with code that doesn't work?

Even the angulardart.org/demo site should do this IMO to stop IE8 (I know, but some enterprise customers still have those old browsers installed - and set as default - for legacy apps) from showing content that doesn't even work.

angulardart.org/demo

1 Answer 1

1

If Dart code cannot be executed the test has to be done in Js. I'm not aware of a library that makes this test.

The test should follow What browsers do you support as JavaScript compilation targets?.

Sign up to request clarification or add additional context in comments.

6 Comments

Question is, how can one check the browser version using Dart code (whether or not via dart2js)?
You shouldn't make this test in Dart because you cannot be sure that the code will be executed as expected. That's why this test should be coded in plain old JS.
Surely a dart app should also be able to verify the browser version without having to rely on plain old JS as well. So how does one access the browser info from Dart code?
Thanks Alexandre, that's indeed what I was after ... but I am a bit disappointed with "Experimental, Supported on: Chrome, Safari", so no Firefox, IE, Opera ... ?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.