mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
delete useless globals
This commit is contained in:
parent
4ce4226afa
commit
7f0663425a
5 changed files with 30 additions and 31 deletions
|
@ -1,12 +1,15 @@
|
|||
import { locationProxy } from "./location";
|
||||
import { windowProxy } from "./window";
|
||||
|
||||
function scope(identifier: any) {
|
||||
if (identifier instanceof Window) {
|
||||
return window.__window;
|
||||
return windowProxy;
|
||||
} else if (identifier instanceof Location) {
|
||||
return window.__location;
|
||||
return locationProxy;
|
||||
}
|
||||
|
||||
return identifier;
|
||||
}
|
||||
|
||||
// shorthand because this can get out of hand reall quickly
|
||||
window.__s = scope;
|
||||
window.__s = scope;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue