accept a context in extendNative() methods

This commit is contained in:
Sami Samhuri 2011-11-05 16:08:00 -07:00
parent 59e6566d51
commit 8b5841587f
3 changed files with 6 additions and 6 deletions

View file

@ -3,8 +3,8 @@
exports.Range = Range; exports.Range = Range;
exports.extendNative = function() { exports.extendNative = function(context) {
global.Range = Range; context.Range = Range;
}; };
function Range(start, length) { function Range(start, length) {

View file

@ -4,8 +4,8 @@
// readable string representations of values // readable string representations of values
exports.repr = repr; exports.repr = repr;
exports.extendNative = function() { exports.extendNative = function(context) {
global.repr = repr; context.repr = repr;
}; };
function repr(x) { function repr(x) {

View file

@ -3,8 +3,8 @@
exports.Set = Set; exports.Set = Set;
exports.extendNative = function() { exports.extendNative = function(context) {
global.Set = Set; context.Set = Set;
}; };
var ownProps = Object.getOwnPropertyNames; var ownProps = Object.getOwnPropertyNames;