Index: src/js/object-observe.js |
diff --git a/src/js/object-observe.js b/src/js/object-observe.js |
index 80296586d214093751c38aa661d34a7280d0bd7b..44bcbea192d77cdba99cb05ac6eb0efbccbad48c 100644 |
--- a/src/js/object-observe.js |
+++ b/src/js/object-observe.js |
@@ -2,13 +2,6 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-var $observeEnqueueSpliceRecord; |
-var $observeBeginPerformSplice; |
-var $observeEndPerformSplice; |
- |
-var $observeObjectMethods; |
-var $observeArrayMethods; |
- |
(function(global, utils) { |
"use strict"; |
@@ -684,13 +677,14 @@ utils.InstallFunctions(notifierPrototype, DONT_ENUM, [ |
"performChange", ObjectNotifierPerformChange |
]); |
-$observeObjectMethods = [ |
+var ObserveObjectMethods = [ |
"deliverChangeRecords", ObjectDeliverChangeRecords, |
"getNotifier", ObjectGetNotifier, |
"observe", ObjectObserve, |
"unobserve", ObjectUnobserve |
]; |
-$observeArrayMethods = [ |
+ |
+var ObserveArrayMethods = [ |
"observe", ArrayObserve, |
"unobserve", ArrayUnobserve |
]; |
@@ -700,12 +694,8 @@ $observeArrayMethods = [ |
var removePrototypeFn = function(f, i) { |
if (i % 2 === 1) %FunctionRemovePrototype(f); |
}; |
-$observeObjectMethods.forEach(removePrototypeFn); |
-$observeArrayMethods.forEach(removePrototypeFn); |
- |
-$observeEnqueueSpliceRecord = EnqueueSpliceRecord; |
-$observeBeginPerformSplice = BeginPerformSplice; |
-$observeEndPerformSplice = EndPerformSplice; |
+ObserveObjectMethods.forEach(removePrototypeFn); |
+ObserveArrayMethods.forEach(removePrototypeFn); |
%InstallToContext([ |
"native_object_get_notifier", NativeObjectGetNotifier, |
@@ -717,4 +707,12 @@ $observeEndPerformSplice = EndPerformSplice; |
"observers_notify_change", NotifyChange, |
]); |
+utils.Export(function(to) { |
+ to.ObserveArrayMethods = ObserveArrayMethods; |
+ to.ObserveBeginPerformSplice = BeginPerformSplice; |
+ to.ObserveEndPerformSplice = EndPerformSplice; |
+ to.ObserveEnqueueSpliceRecord = EnqueueSpliceRecord; |
+ to.ObserveObjectMethods = ObserveObjectMethods; |
+}); |
+ |
}) |