ClojureScript extern 'on' event

Go To


I'm trying to use Twitter Bootstrap's modal dialog jQuery plugin with ClojureScript, which works fine without advanced optimizations, but when Google Closure munges method names, the on method becomes za.

I've been trying to protect on from being munged by using an externs file, but so far no luck creating a definition that fixes this. Tips?

2012-04-04 01:21
by exupero


What finally worked was:

var jQuery;
jQuery.fn = {
  on: function() {}
2012-04-04 09:16
by exupero


with advanced you can either use goog.exportSymbol or window['object']['on'] = object['on']

2012-04-04 07:06
by lennel
goog.exportSymbol would have to be used from within bootstrap-modal.js, no? Also, using window['object']['on'] = object['on'] gives warnings that using the name 'window' does nothing in an externs file - exupero 2012-04-04 09:17