You could simply put your new Function
code inside an else
block:
if (typeof Function == 'undefined') {
location.href="https://stackoverflow.com/questions/58310333/old-browsers.html";
} else {
var f = new Function('return true;');
}
More Related Contents:
- Reloading a single div in an html page [closed]
- Auto Uploading file
- How do you inject this code into HTML using Javascript?
- How to get 100% ADA compliance result in accessibility checker website https://webaccessibility.com? [closed]
- jQuery doesn’t give a proper output, but gives these [closed]
- How do you load a separate .html page with Javascript [duplicate]
- How to modify style to HTML elements (styled externally with CSS) using JS?
- Set the value of an input field
- How to programmatically empty browser cache?
- Use HTML5 to resize an image before upload
- HTML email with Javascript [closed]
- What is the difference between the different methods of putting JavaScript code in an ?
- HTML5 check if audio is playing?
- Prevent form submission with enter key
- Download Canvas as PNG in fabric.js giving network Error
- html5 display audio currentTime
- How to open specific tab of bootstrap nav tabs on click of a particuler link using jQuery?
- update textarea value, but keep cursor position
- css position absolute making the textbox go down
- Save canvas as jpg to desktop [duplicate]
- How do you float elements without a vertical gap?
- How can I prevent a click on a ‘#’ link from jumping to top of page?
- Get elements from page.evaluate in Puppeteer? [duplicate]
- How can I delete a window.history state?
- Detecting HTML5 Drag And Drop support in javascript
- iframe Auto Adjust Height as content changes
- Iframe inherit from parent
- How to show fullscreen popup window in javascript?
- Checking if a textbox is empty in Javascript
- trigger file upload dialog using javascript/jquery