Merge pull request #187 from oleg8sh/patch-4
currentTarget issue in IE8
This commit is contained in:
commit
e094292718
1 changed files with 2 additions and 1 deletions
|
|
@ -384,7 +384,8 @@ Mithril = m = new function app(window, undefined) {
|
||||||
m.withAttr = function(prop, withAttrCallback) {
|
m.withAttr = function(prop, withAttrCallback) {
|
||||||
return function(e) {
|
return function(e) {
|
||||||
e = e || event
|
e = e || event
|
||||||
withAttrCallback(prop in e.currentTarget ? e.currentTarget[prop] : e.currentTarget.getAttribute(prop))
|
var currentTarget = e.currentTarget || this
|
||||||
|
withAttrCallback(prop in currentTarget ? currentTarget[prop] : currentTarget.getAttribute(prop))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue