Skip to content

Commit

Permalink
quoted object keys prevents closure compiler name mangling (fixes #97)
Browse files Browse the repository at this point in the history
  • Loading branch information
amccollum committed Dec 7, 2013
1 parent b7e8f0c commit 9ef5fb5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
20 changes: 10 additions & 10 deletions bean.js
Expand Up @@ -706,16 +706,16 @@
}

, bean = {
on : on
, add : add
, one : one
, off : off
, remove : off
, clone : clone
, fire : fire
, Event : Event
, setSelectorEngine : setSelectorEngine
, noConflict : function () {
'on' : on
, 'add' : add
, 'one' : one
, 'off' : off
, 'remove' : off
, 'clone' : clone
, 'fire' : fire
, 'Event' : Event
, 'setSelectorEngine' : setSelectorEngine
, 'noConflict' : function () {
context[name] = old
return this
}
Expand Down
36 changes: 18 additions & 18 deletions src/ender.js
Expand Up @@ -21,33 +21,33 @@

, hover = function (enter, leave, i) { // i for internal
for (i = this.length; i--;) {
b.on.call(this, this[i], 'mouseenter', enter)
b.on.call(this, this[i], 'mouseleave', leave)
b['on'].call(this, this[i], 'mouseenter', enter)
b['on'].call(this, this[i], 'mouseleave', leave)
}
return this
}

, methods = {
on : on
, addListener : on
, bind : on
, listen : on
, delegate : add // jQuery compat, same arg order as add()
'on' : on
, 'addListener' : on
, 'bind' : on
, 'listen' : on
, 'delegate' : add // jQuery compat, same arg order as add()

, one : one
, 'one' : one

, off : off
, unbind : off
, unlisten : off
, removeListener : off
, undelegate : off
, 'off' : off
, 'unbind' : off
, 'unlisten' : off
, 'removeListener' : off
, 'undelegate' : off

, emit : fire
, trigger : fire
, 'emit' : fire
, 'trigger' : fire

, cloneEvents : clone
, 'cloneEvents' : clone

, hover : hover
, 'hover' : hover
}

, shortcuts =
Expand All @@ -59,7 +59,7 @@
methods[shortcuts[i]] = integrate('on', shortcuts[i])
}

b.setSelectorEngine($)
b['setSelectorEngine']($)

$.ender(methods, true)
}(ender);

0 comments on commit 9ef5fb5

Please sign in to comment.