From 94861796efedc6461096743efbf11a58c7879cbc Mon Sep 17 00:00:00 2001 From: weiyie <912881342@qq.com> Date: Fri, 6 Dec 2019 14:57:13 +0800 Subject: [PATCH] feat: warnning when browser is not support --- lib/browser/client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/browser/client.js b/lib/browser/client.js index 86307dc70..810e6e62b 100644 --- a/lib/browser/client.js +++ b/lib/browser/client.js @@ -25,6 +25,13 @@ function getHeader(headers, name) { return headers[name] || headers[name.toLowerCase()]; } +function _unSupportBrowserTip() { + const { name, version } = platform; + if (name.toLowerCase() === 'ie' && version.split('.')[0] < 10) { + // eslint-disable-next-line no-console + console.warn('ali-oss does not support the current browser'); + } +} // check local web protocol,if https secure default set true , if http secure default set false function isHttpsWebProtocol() { // for web worker not use window.location. @@ -33,6 +40,7 @@ function isHttpsWebProtocol() { } function Client(options, ctx) { + _unSupportBrowserTip(); if (!(this instanceof Client)) { return new Client(options, ctx); }