4 ms·
Thank you for your answer. I just want to add a little thing to the first point. > Why the single quotes around function names? In this case I use quotes to p
by mbasso 9y ago
Thank you for your answer. I just want to add a little thing to the first point.
> Why the single quotes around function names?
In this case I use quotes to prevent name mangling. I have to be sure that the uglify plugin in webpack does not mangle the names of that object because I'll call it from C++ in this way:
window['asmDomHelpers']['domApi']['createComment'](...)
Also, for the same reason, here I'm using this notation instead of this one:
window.asmDomHelpers.domApi.createComment(...)
to let know the closure compiler that I don't want name mangling.
Without quotes these two different compile processes might cause some problems