We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4b55f1 commit 68bde05Copy full SHA for 68bde05
src/directives/attr.js
@@ -44,6 +44,9 @@ module.exports = {
44
} else {
45
this.el.removeAttribute(attr)
46
}
47
+ if (attr in this.el) {
48
+ this.el[attr] = value
49
+ }
50
51
52
test/unit/specs/directives/attr_spec.js
@@ -26,6 +26,14 @@ if (_.inBrowser) {
26
expect(el.getAttribute('test')).toBe('0')
27
})
28
29
+ it('should set property', function () {
30
+ dir.el = document.createElement('input')
31
+ dir.arg = 'value'
32
+ dir.update('what')
33
+ expect(dir.el.getAttribute('value')).toBe('what')
34
+ expect(dir.el.value).toBe('what')
35
+ })
36
+
37
it('xlink', function () {
38
var xlinkNS = 'http://www.w3.org/1999/xlink'
39
dir.arg = 'xlink:special'
0 commit comments