private void ensureDependencies(XMLOutput out) throws JellyTagException {
        AdjunctsInPage adjuncts = AdjunctsInPage.get();

        if (adjuncts.isIncluded("org.kohsuke.stapler.framework.prototype.prototype"))
            return; // all the dependencies met

        if (adjuncts.isIncluded("org.kohsuke.stapler.jquery")) {
            // Old browsers (like htmlunit or <=IE7) doesn't support JSON.stringify needed to do the bind call via jQuery
            // So to be on the safe side we include json2.js. See https://github.com/douglascrockford/JSON-js
            include(out, "org.kohsuke.stapler.json2");
        } else {
            // supply a missing dependency (if we can)
            include(out, "org.kohsuke.stapler.framework.prototype.prototype");
        }
    }
private void ensureDependencies ( XMLOutput out ) throws JellyTagException { AdjunctsInPage adjuncts = AdjunctsInPage . get ( ) ; if ( adjuncts . isIncluded ( "org.kohsuke.stapler.framework.prototype.prototype" ) ) return ; if ( adjuncts . isIncluded ( "org.kohsuke.stapler.jquery" ) ) { include ( out , "org.kohsuke.stapler.json2" ) ; } else { include ( out , "org.kohsuke.stapler.framework.prototype.prototype" ) ; } }
Ensures that we have the dependencies properly available to run bind.js.

bind.js requires either prototype or jQuery. If we use jQuery, we use
{@code JSON.stringify()}, which isn't present in older browser, so we
will add it.