Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/vue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dev
Choose a base ref
...
head repository: stonegithubs/vue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref

There isn’t anything to compare.

vuejs:dev and stonegithubs:dev are entirely different commit histories.

Showing with 11 additions and 0 deletions.
  1. +3 −0 src/directives/attr.js
  2. +8 −0 test/unit/specs/directives/attr_spec.js
3 changes: 3 additions & 0 deletions src/directives/attr.js
Original file line number Diff line number Diff line change
@@ -44,6 +44,9 @@ module.exports = {
} else {
this.el.removeAttribute(attr)
}
if (attr in this.el) {
this.el[attr] = value
}
}

}
8 changes: 8 additions & 0 deletions test/unit/specs/directives/attr_spec.js
Original file line number Diff line number Diff line change
@@ -26,6 +26,14 @@ if (_.inBrowser) {
expect(el.getAttribute('test')).toBe('0')
})

it('should set property', function () {
dir.el = document.createElement('input')
dir.arg = 'value'
dir.update('what')
expect(dir.el.getAttribute('value')).toBe('what')
expect(dir.el.value).toBe('what')
})

it('xlink', function () {
var xlinkNS = 'http://www.w3.org/1999/xlink'
dir.arg = 'xlink:special'