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