summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/extensions/sample9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/extensions/sample b/examples/extensions/sample
index ba264607..1056ab1b 100644
--- a/examples/extensions/sample
+++ b/examples/extensions/sample
@@ -77,8 +77,10 @@ var myExtension = {
this.exports.config = config;
- bind(config.myShortcut, myAction);
- Signal.connect("onNavigation", mySignalCallback);
+ script.own(
+ bind(config.myShortcut, myAction),
+ Signal.connect("onNavigation", mySignalCallback)
+ );
return true;
@@ -113,8 +115,7 @@ var myExtension = {
// defined if some commands were bound in init or some signals were
// connected. Must return true if deinitialization was successful.
end : function() {
- unbind(myAction);
- Signal.disconnect(mySignalCallback);
+ script.removeHandles();
return true;
}
};