From 754ad610489603f80ea38bbd2cf18b28f0d8bf1d Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 20 Apr 2018 20:11:26 -0400 Subject: Import XULRunner and make it produce the generic stub --- .../xulrunner/examples/simple/content/contents.rdf | 0 .../xulrunner/examples/simple/content/simple.js | 17 +++++++++++++++++ .../xulrunner/examples/simple/content/simple.xul | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 application/xulrunner/examples/simple/content/contents.rdf create mode 100644 application/xulrunner/examples/simple/content/simple.js create mode 100644 application/xulrunner/examples/simple/content/simple.xul (limited to 'application/xulrunner/examples/simple/content') diff --git a/application/xulrunner/examples/simple/content/contents.rdf b/application/xulrunner/examples/simple/content/contents.rdf new file mode 100644 index 000000000..e69de29bb diff --git a/application/xulrunner/examples/simple/content/simple.js b/application/xulrunner/examples/simple/content/simple.js new file mode 100644 index 000000000..acf6f1029 --- /dev/null +++ b/application/xulrunner/examples/simple/content/simple.js @@ -0,0 +1,17 @@ +/* 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/. */ + +function onButtonClick() { + var textbox = document.getElementById("textbox"); + + var contractid = (textbox.value % 2 == 0) ? + "@test.mozilla.org/simple-test;1?impl=js" : + "@test.mozilla.org/simple-test;1?impl=c++"; + + var test = Components.classes[contractid]. + createInstance(Components.interfaces.nsISimpleTest); + + textbox.value = test.add(textbox.value, 1); +} diff --git a/application/xulrunner/examples/simple/content/simple.xul b/application/xulrunner/examples/simple/content/simple.xul new file mode 100644 index 000000000..6ff915d0c --- /dev/null +++ b/application/xulrunner/examples/simple/content/simple.xul @@ -0,0 +1,20 @@ + +# vim:set ts=8 sw=8 sts=8 noet: +# 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/. + + + + + + +