diff --git a/editor/browser.js b/editor/browser.js index 956e4b8b..cda1a3a7 100644 --- a/editor/browser.js +++ b/editor/browser.js @@ -20,6 +20,15 @@ if (!svgedit.browser) { svgedit.browser = {}; } +var supportsSvg_ = (function() { + return !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect; +})(); +svgedit.browser.supportsSvg = function() { return supportsSvg_; } +if(!svgedit.browser.supportsSvg()) { + window.location = "browser-not-supported.html"; +} +else{ + var svgns = 'http://www.w3.org/2000/svg'; var userAgent = navigator.userAgent; var svg = document.createElementNS(svgns, 'svg'); @@ -128,4 +137,6 @@ svgedit.browser.supportsGoodDecimals = function() { return supportsGoodDecimals_ svgedit.browser.supportsNonScalingStroke = function() { return supportsNonScalingStroke_; } svgedit.browser.supportsNativeTransformLists = function() { return supportsNativeSVGTransformLists_; } -})(); \ No newline at end of file +} + +})();