You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
oldClass = context.Class; // save current Class namespace
context.Class = Class; // bind Class and jsface to global scope
context.jsface = jsface;
jsface.noConflict = function() { context.Class = oldClass; }; // no conflict
noConflict"pattern" should allow to preserve global context from pollution completely, you'll need to backup and return jsface too:
oldClass=context.Class;// save current Class namespacecontext.Class=Class;// bind Class and jsface to global scopevaroldJsface=context.jsface;context.jsface=jsface;jsface.noConflict=function(){context.Class=oldClass;context.jsface=oldJsface;returnjsface;};// no conflict
Now people can use noConflict like this:
varClass=jsface.noConflict().Class;
If you review this comment I can make a PR for you.
The text was updated successfully, but these errors were encountered:
@mcasimir, I think it's overdone to save and restore jsface. Given development of tooling like webpack and browsersify, commonjs is now supported when you develop javascript for front-end, noConflict becomes less and less useful.
Hi buddy,
this is not enough:
noConflict
"pattern" should allow to preserve global context from pollution completely, you'll need to backup and return jsface too:Now people can use
noConflict
like this:If you review this comment I can make a PR for you.
The text was updated successfully, but these errors were encountered: