@@ -8,15 +8,6 @@ var empty = {}
8
8
var identRE = require ( '../parsers/path' ) . identRE
9
9
var settablePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * ( \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ [ ^ \[ \] ] + \] ) * $ /
10
10
11
- // feature detect browsers (IE) that have trouble
12
- // with binding syntax on certain attributes
13
- var div , preferBinding
14
- if ( _ . inBrowser ) {
15
- div = document . createElement ( 'div' )
16
- div . setAttribute ( ':title' , '' )
17
- preferBinding = div . getAttribute ( 'title' ) !== null
18
- }
19
-
20
11
/**
21
12
* Compile props on a root element and return
22
13
* a props link function.
@@ -60,7 +51,7 @@ module.exports = function compileProps (el, propOptions) {
60
51
}
61
52
62
53
attr = _ . hyphenate ( name )
63
- hasBinding = preferBinding && checkBindingAttr ( el , attr ) !== null
54
+ hasBinding = _ . preferBinding && hasBindingAttr ( el , attr )
64
55
65
56
// first check literal version
66
57
value = prop . raw = _ . attr ( el , attr )
@@ -131,18 +122,14 @@ module.exports = function compileProps (el, propOptions) {
131
122
* @return {String } attr
132
123
*/
133
124
134
- function checkBindingAttr ( el , attr ) {
125
+ function hasBindingAttr ( el , attr ) {
135
126
if ( attr === 'class' ) {
136
- return null
127
+ return false
137
128
}
138
129
139
130
return (
140
- el . getAttribute ( ':' + attr ) ||
141
- el . getAttribute ( ':' + attr + '.once' ) ||
142
- el . getAttribute ( ':' + attr + '.sync' ) ||
143
- el . getAttribute ( 'v-bind:' + attr ) ||
144
- el . getAttribute ( 'v-bind:' + attr + '.once' ) ||
145
- el . getAttribute ( 'v-bind:' + attr + '.sync' )
131
+ el . hasAttribute ( ':' + attr ) ||
132
+ el . hasAttribute ( 'v-bind:' + attr )
146
133
)
147
134
}
148
135
0 commit comments