Skip to content

Commit c47e128

Browse files
committed
move browser sniffing code back to core/util/env
1 parent bba8b91 commit c47e128

File tree

8 files changed

+8
-10
lines changed

8 files changed

+8
-10
lines changed

src/core/util/env.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const inBrowser =
1111
export const UA = inBrowser && window.navigator.userAgent.toLowerCase()
1212
export const isIE = UA && /msie|trident/.test(UA)
1313
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0
14+
export const isEdge = UA && UA.indexOf('edge/') > 0
1415
export const isAndroid = UA && UA.indexOf('android') > 0
1516

1617
// detect devtools

src/platforms/web/compiler/directives/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @flow */
22

3-
import { isIE } from 'web/util/index'
3+
import { isIE } from 'core/util/env'
44
import { addHandler, addProp, getBindingAttr } from 'compiler/helpers'
55

66
let warn

src/platforms/web/compiler/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/* @flow */
22

33
import { extend, genStaticKeys, noop } from 'shared/util'
4+
import { isIE } from 'core/util/env'
45
import { warn } from 'core/util/debug'
56
import { compile as baseCompile } from 'compiler/index'
67
import { detectErrors } from 'compiler/error-detector'
78
import modules from './modules/index'
89
import directives from './directives/index'
910
import {
10-
isIE, isReservedTag, isUnaryTag,
11+
isReservedTag, isUnaryTag,
1112
mustUseProp, getTagNamespace, isPreTag
1213
} from '../util/index'
1314

src/platforms/web/runtime/directives/model.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
*/
55

66
import { looseEqual, looseIndexOf } from 'shared/util'
7-
import { warn } from 'core/util/index'
8-
import { isAndroid, isIE9 } from 'web/util/index'
7+
import { warn, isAndroid, isIE9 } from 'core/util/index'
98

109
const modelableTagRE = /^input|select|textarea|vue-component-[0-9]+(-[0-9a-zA-Z_\-]*)?$/
1110

src/platforms/web/runtime/directives/show.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @flow */
22

3-
import { isIE9 } from 'web/util/index'
3+
import { isIE9 } from 'core/util/env'
44
import { enter, leave } from '../modules/transition'
55

66
// recursively search for possible transition defined inside the component root

src/platforms/web/runtime/modules/transition.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* @flow */
22

3-
import { inBrowser } from 'core/util/index'
4-
import { isIE9 } from 'web/util/index'
3+
import { inBrowser, isIE9 } from 'core/util/index'
54
import { cached, extend } from 'shared/util'
65
import { mergeVNodeHook } from 'core/vdom/helpers'
76
import { activeInstance } from 'core/instance/lifecycle'

src/platforms/web/runtime/transition-util.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* @flow */
22

3-
import { inBrowser } from 'core/util/index'
4-
import { isIE9 } from 'web/util/index'
3+
import { inBrowser, isIE9 } from 'core/util/index'
54
import { remove } from 'shared/util'
65
import { addClass, removeClass } from './class-util'
76

src/platforms/web/util/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* @flow */
22

33
import { warn } from 'core/util/index'
4-
export { inBrowser, isIE, isIE9, isAndroid } from 'core/util/env'
54

65
export * from './attrs'
76
export * from './class'

0 commit comments

Comments
 (0)