prop and withAttr work in progress

This commit is contained in:
Leo Horie 2016-05-21 01:48:11 -04:00
parent e1473dcce8
commit 477e73f300
4 changed files with 32 additions and 8 deletions

5
util/withAttr.js Normal file
View file

@ -0,0 +1,5 @@
"use strict"
module.exports = function(attrName, callback, context) {
return callback.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))
}