You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/04/15 03:56:53 UTC
docs commit: CB-1401 Document existence of onReset for plugin devs
Repository: cordova-docs
Updated Branches:
refs/heads/master d814c7897 -> f5e312554
CB-1401 Document existence of onReset for plugin devs
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/f5e31255
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/f5e31255
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/f5e31255
Branch: refs/heads/master
Commit: f5e312554ba35a922707a323272f1f424d6c8f65
Parents: d814c78
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Apr 14 18:56:46 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Apr 14 18:56:46 2014 -0700
----------------------------------------------------------------------
docs/en/edge/guide/platforms/wp8/plugin.md | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/f5e31255/docs/en/edge/guide/platforms/wp8/plugin.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/wp8/plugin.md b/docs/en/edge/guide/platforms/wp8/plugin.md
index 194f682..acf69a4 100644
--- a/docs/en/edge/guide/platforms/wp8/plugin.md
+++ b/docs/en/edge/guide/platforms/wp8/plugin.md
@@ -163,6 +163,17 @@ bad input. This pattern appears throughout the Cordova C# code:
// ... continue on to do our work
}
+## Plugin Lifetime
+
+Plugins with long-running requests, background activity such as media
+playback, listeners, or that maintain internal state should implement
+the `onReset` method to clean up those activities. The method runs
+when the CordovaView WebBrowser navigates to a new page or refreshes, which
+reloads the JavaScript.
+
+ // defined in WPCordovaClassLib.Cordova.Commands.BaseCommand
+ public virtual void OnReset() { }
+
## Plugin XML
The following shows how to use the `plugin.xml` file to specify a