summaryrefslogtreecommitdiffstats
path: root/application/xulrunner/examples/simple/components/src/SimpleTest.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-04-20 20:11:26 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-04-20 20:11:26 -0400
commit754ad610489603f80ea38bbd2cf18b28f0d8bf1d (patch)
tree9a8b4ed066d335f0817ccb60fdfa5e082322ae3f /application/xulrunner/examples/simple/components/src/SimpleTest.js
parenta26cb28c9780c015694151771d649b7cec4086db (diff)
downloadUXP-754ad610489603f80ea38bbd2cf18b28f0d8bf1d.tar
UXP-754ad610489603f80ea38bbd2cf18b28f0d8bf1d.tar.gz
UXP-754ad610489603f80ea38bbd2cf18b28f0d8bf1d.tar.lz
UXP-754ad610489603f80ea38bbd2cf18b28f0d8bf1d.tar.xz
UXP-754ad610489603f80ea38bbd2cf18b28f0d8bf1d.zip
Import XULRunner and make it produce the generic stub
Diffstat (limited to 'application/xulrunner/examples/simple/components/src/SimpleTest.js')
-rw-r--r--application/xulrunner/examples/simple/components/src/SimpleTest.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.js b/application/xulrunner/examples/simple/components/src/SimpleTest.js
new file mode 100644
index 000000000..e6cf90660
--- /dev/null
+++ b/application/xulrunner/examples/simple/components/src/SimpleTest.js
@@ -0,0 +1,27 @@
+/* vim:set ts=2 sw=2 sts=2 et cin: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
+function SimpleTest() {
+}
+
+SimpleTest.prototype = {
+ classID: Components.ID("{4177e257-a0dc-49b9-a774-522a000a49fa}"),
+
+ QueryInterface: function(iid) {
+ if (iid.equals(Components.interfaces.nsISimpleTest) ||
+ iid.equals(Components.interfaces.nsISupports))
+ return this;
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ },
+
+ add: function(a, b) {
+ dump("add(" + a + "," + b + ") from JS\n");
+ return a + b;
+ }
+};
+
+this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SimpleTest]);