* if the current page is using that extension too. It will unload multiple instances as well.
*/
if( ext instanceof ScriptableFunction ) {
_scriptEngine.addExtension( name, new ScriptableFunctionWrapper( (ScriptableFunction) ext ) );
} else if( ext instanceof Scriptable ) {
_scriptEngine.addExtension( name, new ScriptableWrapper( (Scriptable) ext ) );
} else {
_scriptEngine.addExtension( name, ext );
}
}