Skip to content

Commit

Permalink
chore(*): minor license changes and code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyexeption committed Aug 5, 2020
1 parent 57accfb commit db407e6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ This is a commercial product, requiring a valid paid-for license for commercial
This product is free to use for non-commercial educational use for students in K through 12 grades
or University programs, and for educators to use in a classroom setting as examples / tools in their curriculum.

This repository includes files originally copied from https://github.com/zloirock/core-js
under setImmediate.ts. The original versions of the files are MIT licensed. See the file headers for details.

In order for us to verify your eligibility for free usage, please register for trial at
https://Infragistics.com/Angular and open a support ticket with a request for free license.

To acquire a license for commercial usage, please register for trial at https://Infragistics.com/Angular
and refer to the purchasing options in the pricing section on the product page.

This repository includes code originally copied from https://github.com/zloirock/core-js
in the projects/igniteui-angular/src/lib/core/setImmediate.ts file. The original version of the code is MIT licensed. See the file header for details.

© Copyright 2020 INFRAGISTICS. All Rights Reserved.
The Infragistics Ultimate license & copyright applies to this distribution.
For information on that license, please go to our website https://www.infragistics.com/legal/license.
1 change: 0 additions & 1 deletion projects/igniteui-angular/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
},
"whitelistedNonPeerDependencies": [
"@types/hammerjs",
"core-js-pure",
"hammerjs",
"jszip",
"resize-observer-polyfill",
Expand Down
1 change: 0 additions & 1 deletion projects/igniteui-angular/ng-package.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"whitelistedNonPeerDependencies": [
"@types/hammerjs",
"core-js-pure",
"hammerjs",
"jszip",
"resize-observer-polyfill",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const DEPENDENCIES_MAP: PackageEntry[] = [
{ name: 'resize-observer-polyfill', target: PackageTarget.REGULAR },
{ name: '@types/hammerjs', target: PackageTarget.DEV },
{ name: 'igniteui-trial-watermark', target: PackageTarget.NONE },
{ name: 'core-js-pure', target: PackageTarget.NONE },
{ name: 'lodash.merge', target: PackageTarget.NONE },
// peerDependencies
{ name: '@angular/forms', target: PackageTarget.NONE },
Expand Down
11 changes: 6 additions & 5 deletions projects/igniteui-angular/src/lib/core/setImmediate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ const listener = function (event) {
run(event.data);
};

if (!window.setImmediate) {
window.addEventListener('message', listener, false);
}

export function setImmediate(cb: any) {
if (window.setImmediate) {
window.setImmediate(cb);
return;
return window.setImmediate(cb);
}

const args = [];
Expand All @@ -54,15 +57,13 @@ export function setImmediate(cb: any) {
};

window.postMessage(counter + '', windowLocation.protocol + '//' + windowLocation.host);
window.addEventListener('message', listener, false);

return counter;
}

export function clearImmediate(id: any) {
if (window.clearImmediate) {
window.clearImmediate(id);
return;
return window.clearImmediate(id);
}

delete queue[id];
Expand Down

0 comments on commit db407e6

Please sign in to comment.