mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Add onload attribute to plugin in plugins.xml to create the plugin at load time instead of lazy loading.
This commit is contained in:
parent
7ce2a8cb71
commit
bfef72a7c4
@ -90,6 +90,11 @@ public final class PluginManager {
|
||||
pluginName = xml.getAttributeValue(null, "name");
|
||||
//System.out.println("Plugin: "+name+" => "+value);
|
||||
this.addService(pluginName, pluginClass);
|
||||
|
||||
// Create plugin at load time if attribute "onload"
|
||||
if ("true".equals(xml.getAttributeValue(null, "onload"))) {
|
||||
this.getPlugin(pluginName);
|
||||
}
|
||||
} else if (strNode.equals("url-filter")) {
|
||||
this.urlMap.put(xml.getAttributeValue(null, "value"), pluginName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user