File tree Expand file tree Collapse file tree 4 files changed +438
-0
lines changed Expand file tree Collapse file tree 4 files changed +438
-0
lines changed Original file line number Diff line number Diff line change
1
+ < html >
2
+
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < title > Leak Test Bed</ title >
6
+ </ head >
7
+
8
+ < body >
9
+ < button id ="alloc "> Alloc</ button >
10
+ < button id ="dealloc "> Dealloc</ button >
11
+
12
+ < script src ="/static/vs/loader.js "> </ script >
13
+ < script >
14
+ require . config ( { baseUrl : '/static' } ) ;
15
+
16
+ require ( [ 'vs/base/browser/event' ] , ( { domEvent } ) => {
17
+ let event ;
18
+ let listener ;
19
+
20
+ function alloc ( ) {
21
+ event = domEvent ( document . body , 'mousemove' ) ;
22
+ listener = event ( e => console . log ( e ) ) ;
23
+ }
24
+
25
+ function dealloc ( ) {
26
+ listener . dispose ( ) ;
27
+ listener = null ;
28
+ event = null ;
29
+ }
30
+
31
+ const allocBtn = document . getElementById ( 'alloc' ) ;
32
+ allocBtn . onclick = alloc ;
33
+
34
+ const deallocBtn = document . getElementById ( 'dealloc' ) ;
35
+ deallocBtn . onclick = dealloc ;
36
+ } ) ;
37
+ </ script >
38
+ </ body >
39
+
40
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " leaks" ,
3
+ "version" : " 1.0.0" ,
4
+ "main" : " index.js" ,
5
+ "license" : " MIT" ,
6
+ "devDependencies" : {
7
+ "koa" : " ^2.13.1" ,
8
+ "koa-mount" : " ^4.0.0" ,
9
+ "koa-static" : " ^5.0.0"
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ const Koa = require ( 'koa' ) ;
7
+ const serve = require ( 'koa-static' ) ;
8
+ const mount = require ( 'koa-mount' ) ;
9
+
10
+ const app = new Koa ( ) ;
11
+
12
+ app . use ( serve ( '.' ) ) ;
13
+ app . use ( mount ( '/static' , serve ( '../../out' ) ) ) ;
14
+
15
+ app . listen ( 3000 ) ;
16
+ console . log ( '👉 http://localhost:3000' ) ;
You can’t perform that action at this time.
0 commit comments