Friday, May 15, 2015

Namespacing jQuery

Starting with version 4.9, Orbeon Forms isn't polluting the JavaScript global namespace on the browser by exposing its own version of jQuery.

You will benefit from this improvement if you're embedding a form created with Orbeon Forms into an existing web page, whether you do this using the server-side embedding API, the proxy portlet, or full portlet. In any of those cases, starting with Orbeon Forms 4.9, you don't have to worry about the version of jQuery used by Orbeon Forms conflicting with the version of jQuery used by your page.

However, if your own code, designed to run with Orbeon Forms 4.8 or earlier, was relying on Orbeon Forms exposing its version of jQuery, you will need to change it, but the change should be very simple: in your JavaScript code, instead of $ or jQuery, use ORBEON.jQuery.

No comments:

Post a Comment