main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
824 bytes
|
Rev | Line | |
---|
[d565449] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | exports.isNavigator = exports.isBrowser = exports.off = exports.on = exports.noop = void 0;
|
---|
| 4 | var noop = function () { };
|
---|
| 5 | exports.noop = noop;
|
---|
| 6 | function on(obj) {
|
---|
| 7 | var args = [];
|
---|
| 8 | for (var _i = 1; _i < arguments.length; _i++) {
|
---|
| 9 | args[_i - 1] = arguments[_i];
|
---|
| 10 | }
|
---|
| 11 | if (obj && obj.addEventListener) {
|
---|
| 12 | obj.addEventListener.apply(obj, args);
|
---|
| 13 | }
|
---|
| 14 | }
|
---|
| 15 | exports.on = on;
|
---|
| 16 | function off(obj) {
|
---|
| 17 | var args = [];
|
---|
| 18 | for (var _i = 1; _i < arguments.length; _i++) {
|
---|
| 19 | args[_i - 1] = arguments[_i];
|
---|
| 20 | }
|
---|
| 21 | if (obj && obj.removeEventListener) {
|
---|
| 22 | obj.removeEventListener.apply(obj, args);
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 | exports.off = off;
|
---|
| 26 | exports.isBrowser = typeof window !== 'undefined';
|
---|
| 27 | exports.isNavigator = typeof navigator !== 'undefined';
|
---|
Note:
See
TracBrowser
for help on using the repository browser.