Jeff Thompson | 745026e | 2012-10-13 12:49:20 -0700 | [diff] [blame] | 1 | /* This file is created by running make-ndn-js.jsm.sh in this directory. |
| 2 | * It concatenates ndn-js-header.txt with all the ndn-js source files to |
| 3 | * make ndn-js.jsm . |
Jeff Thompson | e9f1194 | 2012-12-09 12:36:24 -0800 | [diff] [blame^] | 4 | * The file ../../tools/build/ndn-js.js must already be built. |
Jeff Thompson | 146d7de | 2012-11-17 16:15:28 -0800 | [diff] [blame] | 5 | * author: Jeff Thompson |
Jeff Thompson | 745026e | 2012-10-13 12:49:20 -0700 | [diff] [blame] | 6 | * See COPYING for copyright and distribution information. |
Jeff Thompson | 08ab3cd | 2012-10-08 02:56:20 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
Jeff Thompson | 963d2da | 2012-12-02 23:31:22 -0800 | [diff] [blame] | 9 | var EXPORTED_SYMBOLS = ["Closure", "ContentObject", "DataUtils", "Interest", "MimeTypes", "NDN", |
| 10 | "Name", "Sha256", "XpcomTransport"]; |
Jeff Thompson | 08ab3cd | 2012-10-08 02:56:20 -0700 | [diff] [blame] | 11 | |
| 12 | Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); |
| 13 | Components.utils.import("resource://gre/modules/NetUtil.jsm"); |
| 14 | |
Jeff Thompson | 08ab3cd | 2012-10-08 02:56:20 -0700 | [diff] [blame] | 15 | // jsbn.js needs the navigator object which isn't defined in XPCOM, so make a local hack. |
| 16 | var navigator = { |
| 17 | appName: "Netscape" |
| 18 | }; |
| 19 | |
| 20 | // Some code calls console.log without checking LOG>0. Until this is cleaned up, make a local hack console. |
| 21 | var console = { |
| 22 | log: function(message) { |
| 23 | dump(message + "\n"); |
| 24 | } |
| 25 | }; |
| 26 | |