Closed jstayton closed 10 years ago
I like that. jQuery's noConflict()
function accepts a removeAll
flag that restores both $
and jQuery
to their previous values...but, in our case, I think we can just restore both values automatically.
Great! I couldn't have asked for a quicker turn-around on that. Thanks, @kitcambridge!
I will close this for now.
Hey there,
I'm using JSON3 as a dependency in a browser-based third-party JS library. My goal is to prevent potential conflicts as much as possible, so
noConflict
has come in handy. Thanks!One enhancement that I'd like your feedback on is taking
noConflict
one step further and restoring the globalJSON3
object that's exposed to the previous value. This way, if the page including my library already uses an older/newer version of JSON3, there's no chance for potential conflict. (Duh, you all probably don't need that explained. :smile:)What do you think? I may try adding this enhancement if you're cool with the idea.
Thanks again for your work on this!