Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8733759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:43:00+00:00 2026-06-13T09:43:00+00:00

What happens if I try to run my generated javascript code in an unsupported

  • 0

What happens if I try to run my generated javascript code in an unsupported browser? Like IE6?

I don’t want to end up in a situation that my users will see a partly working broken app. Is there a way how to ensure that the dart/javascript will run only if the browser is supported and have my app degrade gracefully to some html banner “use a newer browser please” if it is not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:43:01+00:00Added an answer on June 13, 2026 at 9:43 am

    You could use the browser detector script here: http://www.quirksmode.org/js/detect.html

    I wrote this code from the top of my head, I don’t have a testing machine at my disposal right now:

    var isNewFirefox = BrowserDetect.browser === 'Firefox'  && BrowserDetect.version >= 7;
    var isNewChrome  = BrowserDetect.browser === 'Chrome';
    var isNewIE      = BrowserDetect.browser === 'Explorer' && BrowserDetect.version >= 9;
    var isNewSafari  = BrowserDetect.browser === 'Safari'   && BrowserDetect.version >= 5.1;
    var isNewOpera   = BrowserDetect.browser === 'Opera'    && BrowserDetect.version >= 12;
    
    if (isNewFirefox || isNewChrome || isNewIE || isNewSafari || isNewOpera) {
        var script = document.createElement('script');
    
        if (navigator.webkitStartDart || navigator.startDart || navigator.mozStartDart || navigator.oStartDart || navigator.msStartDart) {
            // Load Dart code!
            script.setAttribute('type', 'application/dart');
            script.setAttribute('src', 'http://.../foo.dart');
        } else {
            // Load dart2js code!
            script.setAttribute('src', 'http://.../foo.js');
        }
    
        document.body.appendChild(script);
    } else {
        alert('Application wont work');
    }
    

    The version information can be found on: http://www.dartlang.org/support/faq.html#what-browsers-supported

    Dart VM detection: http://www.dartlang.org/dartium/#detect

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering what happens when i try to run a new process on
This happens when I try to run rinari-cap: ~/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to
My problem is that whenever I try to compile and run my program, it
To test what happens when I try to load a non-existent resource (on the
i.e. if I create a VARCHAR(50) field, what happens if I try to assign
The problem is that when I try doing multiple animations they all happen the
What happens in the following code? Does the synchronization work? This is an interview
What happens to http requests that are being processed when you stop or restart
I am writing a numerical code, in which I would like to use a
I have some funny noob problem. I try to run unit tests from commandline:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.