forked from jquery-archive/PEP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpointerevents.js
40 lines (35 loc) · 1.04 KB
/
pointerevents.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
(function() {
var thisFile = 'pointerevents.js';
var scopeName = 'PointerEventsPolyfill';
var modules = [
'../WeakMap/weakmap.js',
'src/boot.js',
'src/touch-action.js',
'src/PointerEvent.js',
'src/pointermap.js',
'src/dispatcher.js',
'src/installer.js',
'src/mouse.js',
'src/touch.js',
'src/ms.js',
'src/platform-events.js',
'src/capture.js'
];
window[scopeName] = {
entryPointName: thisFile,
modules: modules
};
var script = document.querySelector('script[src $= "' + thisFile + '"]');
var src = script.attributes.src.value;
var basePath = src.slice(0, src.indexOf(thisFile));
if (!window.PolymerLoader) {
var path = basePath + '../tools/loader/loader.js';
document.write('<script src="' + path + '"></script>');
}
document.write('<script>PolymerLoader.load("' + scopeName + '")</script>');
})();