diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-12-16 20:09:38 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-12-16 20:09:38 -0500 |
commit | e2de507e0261c9b138cd3cf5356c21eca3e7a28d (patch) | |
tree | f32816881d4f8512d42ece948a41ae21c977c633 /xulrunner/examples/simple/components/src/SimpleTest.js | |
parent | 06494f307850c576868831bd28a61464eab1f359 (diff) | |
download | UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar.gz UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar.lz UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar.xz UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.zip |
Issue #1323 - Move XULRunner back to topsrcdir
Diffstat (limited to 'xulrunner/examples/simple/components/src/SimpleTest.js')
-rw-r--r-- | xulrunner/examples/simple/components/src/SimpleTest.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/xulrunner/examples/simple/components/src/SimpleTest.js b/xulrunner/examples/simple/components/src/SimpleTest.js new file mode 100644 index 000000000..e6cf90660 --- /dev/null +++ b/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]); |