@@ -25,12 +25,7 @@ export function createInstanceContext (
25
25
// Each instance has a independent `Vue` module instance
26
26
const Vue = instance . Vue = createVueModuleInstance ( instanceId , weex )
27
27
28
- // DEPRECATED
29
- const timerAPIs = getInstanceTimer ( instanceId , weex . requireModule )
30
-
31
- const instanceContext = Object . assign ( { Vue } , timerAPIs )
32
- Object . freeze ( instanceContext )
33
- return instanceContext
28
+ return { Vue }
34
29
}
35
30
36
31
/**
@@ -145,43 +140,3 @@ function createVueModuleInstance (
145
140
146
141
return Vue
147
142
}
148
-
149
- /**
150
- * DEPRECATED
151
- * Generate HTML5 Timer APIs. An important point is that the callback
152
- * will be converted into callback id when sent to native. So the
153
- * framework can make sure no side effect of the callback happened after
154
- * an instance destroyed.
155
- */
156
- function getInstanceTimer (
157
- instanceId : string ,
158
- moduleGetter : Function
159
- ) : Object {
160
- const instance = instanceOptions [ instanceId ]
161
- const timer = moduleGetter ( 'timer' )
162
- const timerAPIs = {
163
- setTimeout : ( ...args ) => {
164
- const handler = function ( ) {
165
- args [ 0 ] ( ...args . slice ( 2 ) )
166
- }
167
-
168
- timer . setTimeout ( handler , args [ 1 ] )
169
- return instance . document . taskCenter . callbackManager . lastCallbackId . toString ( )
170
- } ,
171
- setInterval : ( ...args ) => {
172
- const handler = function ( ) {
173
- args [ 0 ] ( ...args . slice ( 2 ) )
174
- }
175
-
176
- timer . setInterval ( handler , args [ 1 ] )
177
- return instance . document . taskCenter . callbackManager . lastCallbackId . toString ( )
178
- } ,
179
- clearTimeout : ( n ) => {
180
- timer . clearTimeout ( n )
181
- } ,
182
- clearInterval : ( n ) => {
183
- timer . clearInterval ( n )
184
- }
185
- }
186
- return timerAPIs
187
- }
0 commit comments