1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 10:07:59 +01:00
Files
pentadactyl-pm/common/modules/bootstrap.jsm
Kris Maglione 43f3295127 Merge addon-common module loading code to fix Minefield.
--HG--
extra : rebase_source : 6b5f0dc0a575a6d21892e18cbb56ab0230382356
2012-05-07 17:01:21 -04:00

22 lines
755 B
JavaScript

// Copyright (c) 2011 by Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
/* use strict */
var EXPORTED_SYMBOLS = ["require"];
// Deal with cross-compartment XML passing issues.
function create(proto) Object.create(proto);
function import(obj) {
let res = {};
for each (let key in Object.getOwnPropertyNames(obj))
Object.defineProperty(res, key, Object.getOwnPropertyDescriptor(obj, key));
return res;
}
// Deal with subScriptLoader prepending crap to loaded URLs
Components.utils.import("resource://gre/modules/Services.jsm");
function loadSubScript() Services.scriptloader.loadSubScript.apply(null, arguments);