cordova-docs icon indicating copy to clipboard operation
cordova-docs copied to clipboard

<param name="onload" value="true" />

Open janpio opened this issue 6 years ago • 2 comments

https://cordova.apache.org/docs/en/9.x/guide/platforms/android/plugin.html#plugin-initialization-and-lifetime https://cordova.apache.org/docs/en/9.x/guide/platforms/ios/plugin.html#plugin-initialization-and-lifetime

both have this:

Plugins are not instantiated until they are first referenced by a call from JavaScript, unless with an onload name attribute is set to "true" in config.xml.

Is this actually true, config.xml? Or does this refer to plugin.xml?

janpio avatar Apr 24 '19 18:04 janpio

It's confusing... Generally this line lives in plugin.xml, but inside a config-file block that injects it into the config.xml file at the platform level.

So it's technically accurate to say that it needs to end up in config.xml, but not the main config.xml at the top level.

dpogue avatar Apr 24 '19 18:04 dpogue

Super confusing, especially as config.xml and plugin.xml are super easy to confuse anyway. So the documentation here is showing the end result, not what the user has to do?

janpio avatar Apr 24 '19 18:04 janpio