Skip to content

Commit bd99280

Browse files
weiyiePeterRao
authored andcommitted
feat(browser): warnning when browser is not support (#703)
1 parent 05fc755 commit bd99280

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/browser/client.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ function getHeader(headers, name) {
2525
return headers[name] || headers[name.toLowerCase()];
2626
}
2727

28+
function _unSupportBrowserTip() {
29+
const { name, version } = platform;
30+
if (name.toLowerCase() === 'ie' && version.split('.')[0] < 10) {
31+
// eslint-disable-next-line no-console
32+
console.warn('ali-oss does not support the current browser');
33+
}
34+
}
2835
// check local web protocol,if https secure default set true , if http secure default set false
2936
function isHttpsWebProtocol() {
3037
// for web worker not use window.location.
@@ -33,6 +40,7 @@ function isHttpsWebProtocol() {
3340
}
3441

3542
function Client(options, ctx) {
43+
_unSupportBrowserTip();
3644
if (!(this instanceof Client)) {
3745
return new Client(options, ctx);
3846
}

0 commit comments

Comments
 (0)