mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
### What does this PR do?
Currently bundling and running projects with cyclic async module
dependencies will hang due to module promises never resolving. This PR
unblocks these projects by outputting `await Promise.all` with these
dependencies.
Before (will hang with bun, or error with unsettled top level await with
node):
```js
var __esm = (fn, res) => () => (fn && (res = fn((fn = 0))), res);
var init_mod3 = __esm(async () => {
await init_mod1();
});
var init_mod2 = __esm(async () => {
await init_mod1();
});
var init_mod1 = __esm(async () => {
await init_mod2();
await init_mod3();
});
await init_mod1();
```
After:
```js
var __esm = (fn, res) => () => (fn && (res = fn((fn = 0))), res);
var __promiseAll = Promise.all.bind(Promise);
var init_mod3 = __esm(async () => {
await init_mod1();
});
var init_mod2 = __esm(async () => {
await init_mod1();
});
var init_mod1 = __esm(async () => {
await __promiseAll([init_mod2(), init_mod3()]);
});
await init_mod1();
```
### How did you verify your code works?
Manually and tests
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
932 lines
48 KiB
Zig
932 lines
48 KiB
Zig
// If something is in this list, then a direct identifier expression or property
|
|
// access chain matching this will be assumed to have no side effects and will
|
|
// be removed.
|
|
//
|
|
// This also means code is allowed to be reordered past things in this list. For
|
|
// example, if "console.log" is in this list, permitting reordering allows for
|
|
// "if (a) console.log(b); else console.log(c)" to be reordered and transformed
|
|
// into "console.log(a ? b : c)". Notice that "a" and "console.log" are in a
|
|
// different order, which can only happen if evaluating the "console.log"
|
|
// property access can be assumed to not change the value of "a".
|
|
//
|
|
// Note that membership in this list says nothing about whether calling any of
|
|
// these functions has any side effects. It only says something about
|
|
// referencing these function without calling them.
|
|
pub const global_no_side_effect_property_accesses = &[_][]const string{
|
|
// Array: Static methods
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Static_methods
|
|
&[_]string{ "Array", "from" },
|
|
&[_]string{ "Array", "isArray" },
|
|
&[_]string{ "Array", "of" },
|
|
|
|
// JSON: Static methods
|
|
&[_]string{ "JSON", "parse" },
|
|
&[_]string{ "JSON", "stringify" },
|
|
|
|
// Math: Static properties
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math#Static_properties
|
|
&[_]string{ "Math", "E" },
|
|
&[_]string{ "Math", "LN10" },
|
|
&[_]string{ "Math", "LN2" },
|
|
&[_]string{ "Math", "LOG10E" },
|
|
&[_]string{ "Math", "LOG2E" },
|
|
&[_]string{ "Math", "PI" },
|
|
&[_]string{ "Math", "SQRT1_2" },
|
|
&[_]string{ "Math", "SQRT2" },
|
|
|
|
// Math: Static methods
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math#Static_methods
|
|
&[_]string{ "Math", "abs" },
|
|
&[_]string{ "Math", "acos" },
|
|
&[_]string{ "Math", "acosh" },
|
|
&[_]string{ "Math", "asin" },
|
|
&[_]string{ "Math", "asinh" },
|
|
&[_]string{ "Math", "atan" },
|
|
&[_]string{ "Math", "atan2" },
|
|
&[_]string{ "Math", "atanh" },
|
|
&[_]string{ "Math", "cbrt" },
|
|
&[_]string{ "Math", "ceil" },
|
|
&[_]string{ "Math", "clz32" },
|
|
&[_]string{ "Math", "cos" },
|
|
&[_]string{ "Math", "cosh" },
|
|
&[_]string{ "Math", "exp" },
|
|
&[_]string{ "Math", "expm1" },
|
|
&[_]string{ "Math", "floor" },
|
|
&[_]string{ "Math", "fround" },
|
|
&[_]string{ "Math", "hypot" },
|
|
&[_]string{ "Math", "imul" },
|
|
&[_]string{ "Math", "log" },
|
|
&[_]string{ "Math", "log10" },
|
|
&[_]string{ "Math", "log1p" },
|
|
&[_]string{ "Math", "log2" },
|
|
&[_]string{ "Math", "max" },
|
|
&[_]string{ "Math", "min" },
|
|
&[_]string{ "Math", "pow" },
|
|
&[_]string{ "Math", "random" },
|
|
&[_]string{ "Math", "round" },
|
|
&[_]string{ "Math", "sign" },
|
|
&[_]string{ "Math", "sin" },
|
|
&[_]string{ "Math", "sinh" },
|
|
&[_]string{ "Math", "sqrt" },
|
|
&[_]string{ "Math", "tan" },
|
|
&[_]string{ "Math", "tanh" },
|
|
&[_]string{ "Math", "trunc" },
|
|
|
|
// Number: Static methods
|
|
&[_]string{ "Number", "isFinite" },
|
|
&[_]string{ "Number", "isInteger" },
|
|
&[_]string{ "Number", "isNaN" },
|
|
&[_]string{ "Number", "isSafeInteger" },
|
|
&[_]string{ "Number", "parseFloat" },
|
|
&[_]string{ "Number", "parseInt" },
|
|
|
|
// Object: Static methods
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object#Static_methods
|
|
&[_]string{ "Object", "assign" },
|
|
&[_]string{ "Object", "create" },
|
|
&[_]string{ "Object", "defineProperties" },
|
|
&[_]string{ "Object", "defineProperty" },
|
|
&[_]string{ "Object", "entries" },
|
|
&[_]string{ "Object", "freeze" },
|
|
&[_]string{ "Object", "fromEntries" },
|
|
&[_]string{ "Object", "getOwnPropertyDescriptor" },
|
|
&[_]string{ "Object", "getOwnPropertyDescriptors" },
|
|
&[_]string{ "Object", "getOwnPropertyNames" },
|
|
&[_]string{ "Object", "getOwnPropertySymbols" },
|
|
&[_]string{ "Object", "getPrototypeOf" },
|
|
&[_]string{ "Object", "groupBy" },
|
|
&[_]string{ "Object", "hasOwn" },
|
|
&[_]string{ "Object", "is" },
|
|
&[_]string{ "Object", "isExtensible" },
|
|
&[_]string{ "Object", "isFrozen" },
|
|
&[_]string{ "Object", "isSealed" },
|
|
&[_]string{ "Object", "keys" },
|
|
&[_]string{ "Object", "preventExtensions" },
|
|
&[_]string{ "Object", "seal" },
|
|
&[_]string{ "Object", "setPrototypeOf" },
|
|
&[_]string{ "Object", "values" },
|
|
|
|
// Object: Instance methods
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object#Instance_methods
|
|
&[_]string{ "Object", "prototype", "__defineGetter__" },
|
|
&[_]string{ "Object", "prototype", "__defineSetter__" },
|
|
&[_]string{ "Object", "prototype", "__lookupGetter__" },
|
|
&[_]string{ "Object", "prototype", "__lookupSetter__" },
|
|
&[_]string{ "Object", "prototype", "hasOwnProperty" },
|
|
&[_]string{ "Object", "prototype", "isPrototypeOf" },
|
|
&[_]string{ "Object", "prototype", "propertyIsEnumerable" },
|
|
&[_]string{ "Object", "prototype", "toLocaleString" },
|
|
&[_]string{ "Object", "prototype", "toString" },
|
|
&[_]string{ "Object", "prototype", "unwatch" },
|
|
&[_]string{ "Object", "prototype", "valueOf" },
|
|
&[_]string{ "Object", "prototype", "watch" },
|
|
|
|
// Reflect: Static methods
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect#static_methods
|
|
&[_]string{ "Reflect", "apply" },
|
|
&[_]string{ "Reflect", "construct" },
|
|
&[_]string{ "Reflect", "defineProperty" },
|
|
&[_]string{ "Reflect", "deleteProperty" },
|
|
&[_]string{ "Reflect", "get" },
|
|
&[_]string{ "Reflect", "getOwnPropertyDescriptor" },
|
|
&[_]string{ "Reflect", "getPrototypeOf" },
|
|
&[_]string{ "Reflect", "has" },
|
|
&[_]string{ "Reflect", "isExtensible" },
|
|
&[_]string{ "Reflect", "ownKeys" },
|
|
&[_]string{ "Reflect", "preventExtensions" },
|
|
&[_]string{ "Reflect", "set" },
|
|
&[_]string{ "Reflect", "setPrototypeOf" },
|
|
|
|
// Symbol: Static properties
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#static_properties
|
|
&[_]string{ "Symbol", "asyncDispose" },
|
|
&[_]string{ "Symbol", "asyncIterator" },
|
|
&[_]string{ "Symbol", "dispose" },
|
|
&[_]string{ "Symbol", "hasInstance" },
|
|
&[_]string{ "Symbol", "isConcatSpreadable" },
|
|
&[_]string{ "Symbol", "iterator" },
|
|
&[_]string{ "Symbol", "match" },
|
|
&[_]string{ "Symbol", "matchAll" },
|
|
&[_]string{ "Symbol", "replace" },
|
|
&[_]string{ "Symbol", "search" },
|
|
&[_]string{ "Symbol", "species" },
|
|
&[_]string{ "Symbol", "split" },
|
|
&[_]string{ "Symbol", "toPrimitive" },
|
|
&[_]string{ "Symbol", "toStringTag" },
|
|
&[_]string{ "Symbol", "unscopables" },
|
|
|
|
// Symbol: Static methods
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#static_methods
|
|
&[_]string{ "Symbol", "keyFor" },
|
|
|
|
// Console method references are assumed to have no side effects
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/console
|
|
&[_]string{ "console", "assert" },
|
|
&[_]string{ "console", "clear" },
|
|
&[_]string{ "console", "count" },
|
|
&[_]string{ "console", "countReset" },
|
|
&[_]string{ "console", "debug" },
|
|
&[_]string{ "console", "dir" },
|
|
&[_]string{ "console", "dirxml" },
|
|
&[_]string{ "console", "error" },
|
|
&[_]string{ "console", "group" },
|
|
&[_]string{ "console", "groupCollapsed" },
|
|
&[_]string{ "console", "groupEnd" },
|
|
&[_]string{ "console", "info" },
|
|
&[_]string{ "console", "log" },
|
|
&[_]string{ "console", "table" },
|
|
&[_]string{ "console", "time" },
|
|
&[_]string{ "console", "timeEnd" },
|
|
&[_]string{ "console", "timeLog" },
|
|
&[_]string{ "console", "trace" },
|
|
&[_]string{ "console", "warn" },
|
|
|
|
&[_]string{ "Promise", "resolve" },
|
|
&[_]string{ "Promise", "reject" },
|
|
&[_]string{ "Promise", "all" },
|
|
|
|
// Crypto: Static methods
|
|
&[_]string{ "crypto", "randomUUID" },
|
|
};
|
|
|
|
pub const global_no_side_effect_function_calls_safe_for_to_string = &[_][]const string{
|
|
|
|
// Calling Symbol.for("foo") never throws (unless it's a rope string)
|
|
// This improves React bundle sizes slightly.
|
|
&[_]string{ "Symbol", "for" },
|
|
|
|
// Haven't seen a bundle size improvement from adding more to this list yet.
|
|
};
|
|
|
|
const pure_global_identifier_define = &defines.IdentifierDefine{
|
|
.flags = .{
|
|
.valueless = true,
|
|
.can_be_removed_if_unused = true,
|
|
},
|
|
.value = .{ .e_undefined = .{} },
|
|
};
|
|
|
|
const identifiers = struct {
|
|
const nan_val = js_ast.E.Number{ .value = std.math.nan(f64) };
|
|
|
|
const inf_val = js_ast.E.Number{ .value = std.math.inf(f64) };
|
|
|
|
// Step 2. Swap in certain literal values because those can be constant folded
|
|
pub const @"undefined" = &defines.IdentifierDefine{
|
|
.value = js_ast.Expr.Data{ .e_undefined = .{} },
|
|
.flags = .{
|
|
.valueless = false,
|
|
.can_be_removed_if_unused = true,
|
|
},
|
|
};
|
|
pub const NaN = &defines.IdentifierDefine{
|
|
.value = js_ast.Expr.Data{ .e_number = nan_val },
|
|
};
|
|
pub const Infinity = &defines.IdentifierDefine{
|
|
.value = js_ast.Expr.Data{ .e_number = inf_val },
|
|
};
|
|
};
|
|
|
|
const PureGlobalIdentifierValue = enum {
|
|
NaN,
|
|
Infinity,
|
|
@"strict undefined",
|
|
other,
|
|
|
|
pub fn value(this: PureGlobalIdentifierValue) *const defines.IdentifierDefine {
|
|
return switch (this) {
|
|
.NaN => identifiers.NaN,
|
|
.Infinity => identifiers.Infinity,
|
|
.@"strict undefined" => identifiers.undefined,
|
|
.other => pure_global_identifier_define,
|
|
};
|
|
}
|
|
};
|
|
|
|
pub const pure_global_identifier_map = bun.ComptimeStringMap(PureGlobalIdentifierValue, .{
|
|
.{ "NaN", PureGlobalIdentifierValue.NaN },
|
|
.{ "Infinity", PureGlobalIdentifierValue.Infinity },
|
|
.{ "undefined", PureGlobalIdentifierValue.@"strict undefined" },
|
|
|
|
// These global identifiers should exist in all JavaScript environments. This
|
|
// deliberately omits "NaN", "Infinity", and "undefined" because these are
|
|
// treated as automatically-inlined constants instead of identifiers.
|
|
.{ "Array", PureGlobalIdentifierValue.other },
|
|
.{ "Boolean", PureGlobalIdentifierValue.other },
|
|
.{ "Function", PureGlobalIdentifierValue.other },
|
|
.{ "Math", PureGlobalIdentifierValue.other },
|
|
.{ "Number", PureGlobalIdentifierValue.other },
|
|
.{ "Object", PureGlobalIdentifierValue.other },
|
|
.{ "RegExp", PureGlobalIdentifierValue.other },
|
|
.{ "String", PureGlobalIdentifierValue.other },
|
|
|
|
// Other globals present in both the browser and node (except "eval" because
|
|
// it has special behavior)
|
|
.{ "AbortController", PureGlobalIdentifierValue.other },
|
|
.{ "AbortSignal", PureGlobalIdentifierValue.other },
|
|
.{ "AggregateError", PureGlobalIdentifierValue.other },
|
|
.{ "ArrayBuffer", PureGlobalIdentifierValue.other },
|
|
.{ "BigInt", PureGlobalIdentifierValue.other },
|
|
.{ "DataView", PureGlobalIdentifierValue.other },
|
|
.{ "Date", PureGlobalIdentifierValue.other },
|
|
.{ "Error", PureGlobalIdentifierValue.other },
|
|
.{ "EvalError", PureGlobalIdentifierValue.other },
|
|
.{ "Event", PureGlobalIdentifierValue.other },
|
|
.{ "EventTarget", PureGlobalIdentifierValue.other },
|
|
.{ "Float16Array", PureGlobalIdentifierValue.other },
|
|
.{ "Float32Array", PureGlobalIdentifierValue.other },
|
|
.{ "Float64Array", PureGlobalIdentifierValue.other },
|
|
.{ "Int16Array", PureGlobalIdentifierValue.other },
|
|
.{ "Int32Array", PureGlobalIdentifierValue.other },
|
|
.{ "Int8Array", PureGlobalIdentifierValue.other },
|
|
.{ "Intl", PureGlobalIdentifierValue.other },
|
|
.{ "JSON", PureGlobalIdentifierValue.other },
|
|
.{ "Map", PureGlobalIdentifierValue.other },
|
|
.{ "MessageChannel", PureGlobalIdentifierValue.other },
|
|
.{ "MessageEvent", PureGlobalIdentifierValue.other },
|
|
.{ "MessagePort", PureGlobalIdentifierValue.other },
|
|
.{ "Promise", PureGlobalIdentifierValue.other },
|
|
.{ "Proxy", PureGlobalIdentifierValue.other },
|
|
.{ "RangeError", PureGlobalIdentifierValue.other },
|
|
.{ "ReferenceError", PureGlobalIdentifierValue.other },
|
|
.{ "Reflect", PureGlobalIdentifierValue.other },
|
|
.{ "Set", PureGlobalIdentifierValue.other },
|
|
.{ "Symbol", PureGlobalIdentifierValue.other },
|
|
.{ "SyntaxError", PureGlobalIdentifierValue.other },
|
|
.{ "TextDecoder", PureGlobalIdentifierValue.other },
|
|
.{ "TextEncoder", PureGlobalIdentifierValue.other },
|
|
.{ "TypeError", PureGlobalIdentifierValue.other },
|
|
.{ "URIError", PureGlobalIdentifierValue.other },
|
|
.{ "URL", PureGlobalIdentifierValue.other },
|
|
.{ "URLSearchParams", PureGlobalIdentifierValue.other },
|
|
.{ "Uint16Array", PureGlobalIdentifierValue.other },
|
|
.{ "Uint32Array", PureGlobalIdentifierValue.other },
|
|
.{ "Uint8Array", PureGlobalIdentifierValue.other },
|
|
.{ "Uint8ClampedArray", PureGlobalIdentifierValue.other },
|
|
.{ "WeakMap", PureGlobalIdentifierValue.other },
|
|
.{ "WeakSet", PureGlobalIdentifierValue.other },
|
|
.{ "WebAssembly", PureGlobalIdentifierValue.other },
|
|
.{ "clearInterval", PureGlobalIdentifierValue.other },
|
|
.{ "clearTimeout", PureGlobalIdentifierValue.other },
|
|
.{ "console", PureGlobalIdentifierValue.other },
|
|
.{ "decodeURI", PureGlobalIdentifierValue.other },
|
|
.{ "decodeURIComponent", PureGlobalIdentifierValue.other },
|
|
.{ "encodeURI", PureGlobalIdentifierValue.other },
|
|
.{ "encodeURIComponent", PureGlobalIdentifierValue.other },
|
|
.{ "escape", PureGlobalIdentifierValue.other },
|
|
.{ "globalThis", PureGlobalIdentifierValue.other },
|
|
.{ "isFinite", PureGlobalIdentifierValue.other },
|
|
.{ "isNaN", PureGlobalIdentifierValue.other },
|
|
.{ "parseFloat", PureGlobalIdentifierValue.other },
|
|
.{ "parseInt", PureGlobalIdentifierValue.other },
|
|
.{ "queueMicrotask", PureGlobalIdentifierValue.other },
|
|
.{ "setInterval", PureGlobalIdentifierValue.other },
|
|
.{ "setTimeout", PureGlobalIdentifierValue.other },
|
|
.{ "unescape", PureGlobalIdentifierValue.other },
|
|
|
|
// CSSOM APIs
|
|
.{ "CSSAnimation", PureGlobalIdentifierValue.other },
|
|
.{ "CSSFontFaceRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSImportRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSKeyframeRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSKeyframesRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSMediaRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSNamespaceRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSPageRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSRuleList", PureGlobalIdentifierValue.other },
|
|
.{ "CSSStyleDeclaration", PureGlobalIdentifierValue.other },
|
|
.{ "CSSStyleRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSStyleSheet", PureGlobalIdentifierValue.other },
|
|
.{ "CSSSupportsRule", PureGlobalIdentifierValue.other },
|
|
.{ "CSSTransition", PureGlobalIdentifierValue.other },
|
|
|
|
// SVG DOM
|
|
.{ "SVGAElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAngle", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimateElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimateMotionElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimateTransformElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedAngle", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedBoolean", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedEnumeration", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedInteger", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedLength", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedLengthList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedNumber", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedNumberList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedPreserveAspectRatio", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedRect", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedString", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimatedTransformList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGAnimationElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGCircleElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGClipPathElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGComponentTransferFunctionElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGDefsElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGDescElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGEllipseElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEBlendElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEColorMatrixElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEComponentTransferElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFECompositeElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEConvolveMatrixElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEDiffuseLightingElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEDisplacementMapElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEDistantLightElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEDropShadowElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEFloodElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEFuncAElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEFuncBElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEFuncGElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEFuncRElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEGaussianBlurElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEImageElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEMergeElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEMergeNodeElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEMorphologyElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEOffsetElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFEPointLightElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFESpecularLightingElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFESpotLightElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFETileElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFETurbulenceElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGFilterElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGForeignObjectElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGGElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGGeometryElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGGradientElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGGraphicsElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGImageElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGLength", PureGlobalIdentifierValue.other },
|
|
.{ "SVGLengthList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGLineElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGLinearGradientElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGMPathElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGMarkerElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGMaskElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGMatrix", PureGlobalIdentifierValue.other },
|
|
.{ "SVGMetadataElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGNumber", PureGlobalIdentifierValue.other },
|
|
.{ "SVGNumberList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPathElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPatternElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPoint", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPointList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPolygonElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPolylineElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGPreserveAspectRatio", PureGlobalIdentifierValue.other },
|
|
.{ "SVGRadialGradientElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGRect", PureGlobalIdentifierValue.other },
|
|
.{ "SVGRectElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGSVGElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGScriptElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGSetElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGStopElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGStringList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGStyleElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGSwitchElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGSymbolElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTSpanElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTextContentElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTextElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTextPathElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTextPositioningElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTitleElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTransform", PureGlobalIdentifierValue.other },
|
|
.{ "SVGTransformList", PureGlobalIdentifierValue.other },
|
|
.{ "SVGUnitTypes", PureGlobalIdentifierValue.other },
|
|
.{ "SVGUseElement", PureGlobalIdentifierValue.other },
|
|
.{ "SVGViewElement", PureGlobalIdentifierValue.other },
|
|
|
|
// Other browser APIs
|
|
//
|
|
// This list contains all globals present in modern versions of Chrome, Safari,
|
|
// and Firefox except for the following properties, since they have a side effect
|
|
// of triggering layout (https://gist.github.com/paulirish/5d52fb081b3570c81e3a):
|
|
//
|
|
// - scrollX
|
|
// - scrollY
|
|
// - innerWidth
|
|
// - innerHeight
|
|
// - pageXOffset
|
|
// - pageYOffset
|
|
//
|
|
// The following globals have also been removed since they sometimes throw an
|
|
// exception when accessed, which is a side effect (for more information see
|
|
// https://stackoverflow.com/a/33047477):
|
|
//
|
|
// - localStorage
|
|
// - sessionStorage
|
|
//
|
|
.{ "AnalyserNode", PureGlobalIdentifierValue.other },
|
|
.{ "Animation", PureGlobalIdentifierValue.other },
|
|
.{ "AnimationEffect", PureGlobalIdentifierValue.other },
|
|
.{ "AnimationEvent", PureGlobalIdentifierValue.other },
|
|
.{ "AnimationPlaybackEvent", PureGlobalIdentifierValue.other },
|
|
.{ "AnimationTimeline", PureGlobalIdentifierValue.other },
|
|
.{ "Attr", PureGlobalIdentifierValue.other },
|
|
.{ "Audio", PureGlobalIdentifierValue.other },
|
|
.{ "AudioBuffer", PureGlobalIdentifierValue.other },
|
|
.{ "AudioBufferSourceNode", PureGlobalIdentifierValue.other },
|
|
.{ "AudioDestinationNode", PureGlobalIdentifierValue.other },
|
|
.{ "AudioListener", PureGlobalIdentifierValue.other },
|
|
.{ "AudioNode", PureGlobalIdentifierValue.other },
|
|
.{ "AudioParam", PureGlobalIdentifierValue.other },
|
|
.{ "AudioProcessingEvent", PureGlobalIdentifierValue.other },
|
|
.{ "AudioScheduledSourceNode", PureGlobalIdentifierValue.other },
|
|
.{ "BarProp", PureGlobalIdentifierValue.other },
|
|
.{ "BeforeUnloadEvent", PureGlobalIdentifierValue.other },
|
|
.{ "BiquadFilterNode", PureGlobalIdentifierValue.other },
|
|
.{ "Blob", PureGlobalIdentifierValue.other },
|
|
.{ "BlobEvent", PureGlobalIdentifierValue.other },
|
|
.{ "ByteLengthQueuingStrategy", PureGlobalIdentifierValue.other },
|
|
.{ "CDATASection", PureGlobalIdentifierValue.other },
|
|
.{ "CSS", PureGlobalIdentifierValue.other },
|
|
.{ "CanvasGradient", PureGlobalIdentifierValue.other },
|
|
.{ "CanvasPattern", PureGlobalIdentifierValue.other },
|
|
.{ "CanvasRenderingContext2D", PureGlobalIdentifierValue.other },
|
|
.{ "ChannelMergerNode", PureGlobalIdentifierValue.other },
|
|
.{ "ChannelSplitterNode", PureGlobalIdentifierValue.other },
|
|
.{ "CharacterData", PureGlobalIdentifierValue.other },
|
|
.{ "ClipboardEvent", PureGlobalIdentifierValue.other },
|
|
.{ "CloseEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Comment", PureGlobalIdentifierValue.other },
|
|
.{ "CompositionEvent", PureGlobalIdentifierValue.other },
|
|
.{ "ConvolverNode", PureGlobalIdentifierValue.other },
|
|
.{ "CountQueuingStrategy", PureGlobalIdentifierValue.other },
|
|
.{ "Crypto", PureGlobalIdentifierValue.other },
|
|
.{ "CustomElementRegistry", PureGlobalIdentifierValue.other },
|
|
.{ "CustomEvent", PureGlobalIdentifierValue.other },
|
|
.{ "DOMException", PureGlobalIdentifierValue.other },
|
|
.{ "DOMImplementation", PureGlobalIdentifierValue.other },
|
|
.{ "DOMMatrix", PureGlobalIdentifierValue.other },
|
|
.{ "DOMMatrixReadOnly", PureGlobalIdentifierValue.other },
|
|
.{ "DOMParser", PureGlobalIdentifierValue.other },
|
|
.{ "DOMPoint", PureGlobalIdentifierValue.other },
|
|
.{ "DOMPointReadOnly", PureGlobalIdentifierValue.other },
|
|
.{ "DOMQuad", PureGlobalIdentifierValue.other },
|
|
.{ "DOMRect", PureGlobalIdentifierValue.other },
|
|
.{ "DOMRectList", PureGlobalIdentifierValue.other },
|
|
.{ "DOMRectReadOnly", PureGlobalIdentifierValue.other },
|
|
.{ "DOMStringList", PureGlobalIdentifierValue.other },
|
|
.{ "DOMStringMap", PureGlobalIdentifierValue.other },
|
|
.{ "DOMTokenList", PureGlobalIdentifierValue.other },
|
|
.{ "DataTransfer", PureGlobalIdentifierValue.other },
|
|
.{ "DataTransferItem", PureGlobalIdentifierValue.other },
|
|
.{ "DataTransferItemList", PureGlobalIdentifierValue.other },
|
|
.{ "DelayNode", PureGlobalIdentifierValue.other },
|
|
.{ "Document", PureGlobalIdentifierValue.other },
|
|
.{ "DocumentFragment", PureGlobalIdentifierValue.other },
|
|
.{ "DocumentTimeline", PureGlobalIdentifierValue.other },
|
|
.{ "DocumentType", PureGlobalIdentifierValue.other },
|
|
.{ "DragEvent", PureGlobalIdentifierValue.other },
|
|
.{ "DynamicsCompressorNode", PureGlobalIdentifierValue.other },
|
|
.{ "Element", PureGlobalIdentifierValue.other },
|
|
.{ "ErrorEvent", PureGlobalIdentifierValue.other },
|
|
.{ "EventSource", PureGlobalIdentifierValue.other },
|
|
.{ "File", PureGlobalIdentifierValue.other },
|
|
.{ "FileList", PureGlobalIdentifierValue.other },
|
|
.{ "FileReader", PureGlobalIdentifierValue.other },
|
|
.{ "FocusEvent", PureGlobalIdentifierValue.other },
|
|
.{ "FontFace", PureGlobalIdentifierValue.other },
|
|
.{ "FormData", PureGlobalIdentifierValue.other },
|
|
.{ "GainNode", PureGlobalIdentifierValue.other },
|
|
.{ "Gamepad", PureGlobalIdentifierValue.other },
|
|
.{ "GamepadButton", PureGlobalIdentifierValue.other },
|
|
.{ "GamepadEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Geolocation", PureGlobalIdentifierValue.other },
|
|
.{ "GeolocationPositionError", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLAllCollection", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLAnchorElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLAreaElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLAudioElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLBRElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLBaseElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLBodyElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLButtonElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLCanvasElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLCollection", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDListElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDataElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDataListElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDetailsElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDirectoryElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDivElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLDocument", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLEmbedElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLFieldSetElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLFontElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLFormControlsCollection", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLFormElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLFrameElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLFrameSetElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLHRElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLHeadElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLHeadingElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLHtmlElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLIFrameElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLImageElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLInputElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLLIElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLLabelElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLLegendElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLLinkElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLMapElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLMarqueeElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLMediaElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLMenuElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLMetaElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLMeterElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLModElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLOListElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLObjectElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLOptGroupElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLOptionElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLOptionsCollection", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLOutputElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLParagraphElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLParamElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLPictureElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLPreElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLProgressElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLQuoteElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLScriptElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLSelectElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLSlotElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLSourceElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLSpanElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLStyleElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTableCaptionElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTableCellElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTableColElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTableElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTableRowElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTableSectionElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTemplateElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTextAreaElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTimeElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTitleElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLTrackElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLUListElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLUnknownElement", PureGlobalIdentifierValue.other },
|
|
.{ "HTMLVideoElement", PureGlobalIdentifierValue.other },
|
|
.{ "HashChangeEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Headers", PureGlobalIdentifierValue.other },
|
|
.{ "History", PureGlobalIdentifierValue.other },
|
|
.{ "IDBCursor", PureGlobalIdentifierValue.other },
|
|
.{ "IDBCursorWithValue", PureGlobalIdentifierValue.other },
|
|
.{ "IDBDatabase", PureGlobalIdentifierValue.other },
|
|
.{ "IDBFactory", PureGlobalIdentifierValue.other },
|
|
.{ "IDBIndex", PureGlobalIdentifierValue.other },
|
|
.{ "IDBKeyRange", PureGlobalIdentifierValue.other },
|
|
.{ "IDBObjectStore", PureGlobalIdentifierValue.other },
|
|
.{ "IDBOpenDBRequest", PureGlobalIdentifierValue.other },
|
|
.{ "IDBRequest", PureGlobalIdentifierValue.other },
|
|
.{ "IDBTransaction", PureGlobalIdentifierValue.other },
|
|
.{ "IDBVersionChangeEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Image", PureGlobalIdentifierValue.other },
|
|
.{ "ImageData", PureGlobalIdentifierValue.other },
|
|
.{ "InputEvent", PureGlobalIdentifierValue.other },
|
|
.{ "IntersectionObserver", PureGlobalIdentifierValue.other },
|
|
.{ "IntersectionObserverEntry", PureGlobalIdentifierValue.other },
|
|
.{ "KeyboardEvent", PureGlobalIdentifierValue.other },
|
|
.{ "KeyframeEffect", PureGlobalIdentifierValue.other },
|
|
.{ "Location", PureGlobalIdentifierValue.other },
|
|
.{ "MediaCapabilities", PureGlobalIdentifierValue.other },
|
|
.{ "MediaElementAudioSourceNode", PureGlobalIdentifierValue.other },
|
|
.{ "MediaEncryptedEvent", PureGlobalIdentifierValue.other },
|
|
.{ "MediaError", PureGlobalIdentifierValue.other },
|
|
.{ "MediaList", PureGlobalIdentifierValue.other },
|
|
.{ "MediaQueryList", PureGlobalIdentifierValue.other },
|
|
.{ "MediaQueryListEvent", PureGlobalIdentifierValue.other },
|
|
.{ "MediaRecorder", PureGlobalIdentifierValue.other },
|
|
.{ "MediaSource", PureGlobalIdentifierValue.other },
|
|
.{ "MediaStream", PureGlobalIdentifierValue.other },
|
|
.{ "MediaStreamAudioDestinationNode", PureGlobalIdentifierValue.other },
|
|
.{ "MediaStreamAudioSourceNode", PureGlobalIdentifierValue.other },
|
|
.{ "MediaStreamTrack", PureGlobalIdentifierValue.other },
|
|
.{ "MediaStreamTrackEvent", PureGlobalIdentifierValue.other },
|
|
.{ "MimeType", PureGlobalIdentifierValue.other },
|
|
.{ "MimeTypeArray", PureGlobalIdentifierValue.other },
|
|
.{ "MouseEvent", PureGlobalIdentifierValue.other },
|
|
.{ "MutationEvent", PureGlobalIdentifierValue.other },
|
|
.{ "MutationObserver", PureGlobalIdentifierValue.other },
|
|
.{ "MutationRecord", PureGlobalIdentifierValue.other },
|
|
.{ "NamedNodeMap", PureGlobalIdentifierValue.other },
|
|
.{ "Navigator", PureGlobalIdentifierValue.other },
|
|
.{ "Node", PureGlobalIdentifierValue.other },
|
|
.{ "NodeFilter", PureGlobalIdentifierValue.other },
|
|
.{ "NodeIterator", PureGlobalIdentifierValue.other },
|
|
.{ "NodeList", PureGlobalIdentifierValue.other },
|
|
.{ "Notification", PureGlobalIdentifierValue.other },
|
|
.{ "OfflineAudioCompletionEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Option", PureGlobalIdentifierValue.other },
|
|
.{ "OscillatorNode", PureGlobalIdentifierValue.other },
|
|
.{ "PageTransitionEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Path2D", PureGlobalIdentifierValue.other },
|
|
.{ "Performance", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceEntry", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceMark", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceMeasure", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceNavigation", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceObserver", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceObserverEntryList", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceResourceTiming", PureGlobalIdentifierValue.other },
|
|
.{ "PerformanceTiming", PureGlobalIdentifierValue.other },
|
|
.{ "PeriodicWave", PureGlobalIdentifierValue.other },
|
|
.{ "Plugin", PureGlobalIdentifierValue.other },
|
|
.{ "PluginArray", PureGlobalIdentifierValue.other },
|
|
.{ "PointerEvent", PureGlobalIdentifierValue.other },
|
|
.{ "PopStateEvent", PureGlobalIdentifierValue.other },
|
|
.{ "ProcessingInstruction", PureGlobalIdentifierValue.other },
|
|
.{ "ProgressEvent", PureGlobalIdentifierValue.other },
|
|
.{ "PromiseRejectionEvent", PureGlobalIdentifierValue.other },
|
|
.{ "RTCCertificate", PureGlobalIdentifierValue.other },
|
|
.{ "RTCDTMFSender", PureGlobalIdentifierValue.other },
|
|
.{ "RTCDTMFToneChangeEvent", PureGlobalIdentifierValue.other },
|
|
.{ "RTCDataChannel", PureGlobalIdentifierValue.other },
|
|
.{ "RTCDataChannelEvent", PureGlobalIdentifierValue.other },
|
|
.{ "RTCIceCandidate", PureGlobalIdentifierValue.other },
|
|
.{ "RTCPeerConnection", PureGlobalIdentifierValue.other },
|
|
.{ "RTCPeerConnectionIceEvent", PureGlobalIdentifierValue.other },
|
|
.{ "RTCRtpReceiver", PureGlobalIdentifierValue.other },
|
|
.{ "RTCRtpSender", PureGlobalIdentifierValue.other },
|
|
.{ "RTCRtpTransceiver", PureGlobalIdentifierValue.other },
|
|
.{ "RTCSessionDescription", PureGlobalIdentifierValue.other },
|
|
.{ "RTCStatsReport", PureGlobalIdentifierValue.other },
|
|
.{ "RTCTrackEvent", PureGlobalIdentifierValue.other },
|
|
.{ "RadioNodeList", PureGlobalIdentifierValue.other },
|
|
.{ "Range", PureGlobalIdentifierValue.other },
|
|
.{ "ReadableStream", PureGlobalIdentifierValue.other },
|
|
.{ "Request", PureGlobalIdentifierValue.other },
|
|
.{ "ResizeObserver", PureGlobalIdentifierValue.other },
|
|
.{ "ResizeObserverEntry", PureGlobalIdentifierValue.other },
|
|
.{ "Response", PureGlobalIdentifierValue.other },
|
|
.{ "Screen", PureGlobalIdentifierValue.other },
|
|
.{ "ScriptProcessorNode", PureGlobalIdentifierValue.other },
|
|
.{ "SecurityPolicyViolationEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Selection", PureGlobalIdentifierValue.other },
|
|
.{ "ShadowRoot", PureGlobalIdentifierValue.other },
|
|
.{ "SourceBuffer", PureGlobalIdentifierValue.other },
|
|
.{ "SourceBufferList", PureGlobalIdentifierValue.other },
|
|
.{ "SpeechSynthesisEvent", PureGlobalIdentifierValue.other },
|
|
.{ "SpeechSynthesisUtterance", PureGlobalIdentifierValue.other },
|
|
.{ "StaticRange", PureGlobalIdentifierValue.other },
|
|
.{ "Storage", PureGlobalIdentifierValue.other },
|
|
.{ "StorageEvent", PureGlobalIdentifierValue.other },
|
|
.{ "StyleSheet", PureGlobalIdentifierValue.other },
|
|
.{ "StyleSheetList", PureGlobalIdentifierValue.other },
|
|
.{ "Text", PureGlobalIdentifierValue.other },
|
|
.{ "TextMetrics", PureGlobalIdentifierValue.other },
|
|
.{ "TextTrack", PureGlobalIdentifierValue.other },
|
|
.{ "TextTrackCue", PureGlobalIdentifierValue.other },
|
|
.{ "TextTrackCueList", PureGlobalIdentifierValue.other },
|
|
.{ "TextTrackList", PureGlobalIdentifierValue.other },
|
|
.{ "TimeRanges", PureGlobalIdentifierValue.other },
|
|
.{ "TrackEvent", PureGlobalIdentifierValue.other },
|
|
.{ "TransitionEvent", PureGlobalIdentifierValue.other },
|
|
.{ "TreeWalker", PureGlobalIdentifierValue.other },
|
|
.{ "UIEvent", PureGlobalIdentifierValue.other },
|
|
.{ "VTTCue", PureGlobalIdentifierValue.other },
|
|
.{ "ValidityState", PureGlobalIdentifierValue.other },
|
|
.{ "VisualViewport", PureGlobalIdentifierValue.other },
|
|
.{ "WaveShaperNode", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLActiveInfo", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLBuffer", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLContextEvent", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLFramebuffer", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLProgram", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLQuery", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLRenderbuffer", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLRenderingContext", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLSampler", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLShader", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLShaderPrecisionFormat", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLSync", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLTexture", PureGlobalIdentifierValue.other },
|
|
.{ "WebGLUniformLocation", PureGlobalIdentifierValue.other },
|
|
.{ "WebKitCSSMatrix", PureGlobalIdentifierValue.other },
|
|
.{ "WebSocket", PureGlobalIdentifierValue.other },
|
|
.{ "WheelEvent", PureGlobalIdentifierValue.other },
|
|
.{ "Window", PureGlobalIdentifierValue.other },
|
|
.{ "Worker", PureGlobalIdentifierValue.other },
|
|
.{ "XMLDocument", PureGlobalIdentifierValue.other },
|
|
.{ "XMLHttpRequest", PureGlobalIdentifierValue.other },
|
|
.{ "XMLHttpRequestEventTarget", PureGlobalIdentifierValue.other },
|
|
.{ "XMLHttpRequestUpload", PureGlobalIdentifierValue.other },
|
|
.{ "XMLSerializer", PureGlobalIdentifierValue.other },
|
|
.{ "XPathEvaluator", PureGlobalIdentifierValue.other },
|
|
.{ "XPathExpression", PureGlobalIdentifierValue.other },
|
|
.{ "XPathResult", PureGlobalIdentifierValue.other },
|
|
.{ "XSLTProcessor", PureGlobalIdentifierValue.other },
|
|
.{ "alert", PureGlobalIdentifierValue.other },
|
|
.{ "atob", PureGlobalIdentifierValue.other },
|
|
.{ "blur", PureGlobalIdentifierValue.other },
|
|
.{ "btoa", PureGlobalIdentifierValue.other },
|
|
.{ "cancelAnimationFrame", PureGlobalIdentifierValue.other },
|
|
.{ "captureEvents", PureGlobalIdentifierValue.other },
|
|
.{ "close", PureGlobalIdentifierValue.other },
|
|
.{ "closed", PureGlobalIdentifierValue.other },
|
|
.{ "confirm", PureGlobalIdentifierValue.other },
|
|
.{ "customElements", PureGlobalIdentifierValue.other },
|
|
.{ "devicePixelRatio", PureGlobalIdentifierValue.other },
|
|
.{ "document", PureGlobalIdentifierValue.other },
|
|
.{ "event", PureGlobalIdentifierValue.other },
|
|
.{ "fetch", PureGlobalIdentifierValue.other },
|
|
.{ "find", PureGlobalIdentifierValue.other },
|
|
.{ "focus", PureGlobalIdentifierValue.other },
|
|
.{ "frameElement", PureGlobalIdentifierValue.other },
|
|
.{ "frames", PureGlobalIdentifierValue.other },
|
|
.{ "getComputedStyle", PureGlobalIdentifierValue.other },
|
|
.{ "getSelection", PureGlobalIdentifierValue.other },
|
|
.{ "history", PureGlobalIdentifierValue.other },
|
|
.{ "indexedDB", PureGlobalIdentifierValue.other },
|
|
.{ "isSecureContext", PureGlobalIdentifierValue.other },
|
|
.{ "length", PureGlobalIdentifierValue.other },
|
|
.{ "location", PureGlobalIdentifierValue.other },
|
|
.{ "locationbar", PureGlobalIdentifierValue.other },
|
|
.{ "matchMedia", PureGlobalIdentifierValue.other },
|
|
.{ "menubar", PureGlobalIdentifierValue.other },
|
|
.{ "moveBy", PureGlobalIdentifierValue.other },
|
|
.{ "moveTo", PureGlobalIdentifierValue.other },
|
|
.{ "name", PureGlobalIdentifierValue.other },
|
|
.{ "navigator", PureGlobalIdentifierValue.other },
|
|
.{ "onabort", PureGlobalIdentifierValue.other },
|
|
.{ "onafterprint", PureGlobalIdentifierValue.other },
|
|
.{ "onanimationend", PureGlobalIdentifierValue.other },
|
|
.{ "onanimationiteration", PureGlobalIdentifierValue.other },
|
|
.{ "onanimationstart", PureGlobalIdentifierValue.other },
|
|
.{ "onbeforeprint", PureGlobalIdentifierValue.other },
|
|
.{ "onbeforeunload", PureGlobalIdentifierValue.other },
|
|
.{ "onblur", PureGlobalIdentifierValue.other },
|
|
.{ "oncanplay", PureGlobalIdentifierValue.other },
|
|
.{ "oncanplaythrough", PureGlobalIdentifierValue.other },
|
|
.{ "onchange", PureGlobalIdentifierValue.other },
|
|
.{ "onclick", PureGlobalIdentifierValue.other },
|
|
.{ "oncontextmenu", PureGlobalIdentifierValue.other },
|
|
.{ "oncuechange", PureGlobalIdentifierValue.other },
|
|
.{ "ondblclick", PureGlobalIdentifierValue.other },
|
|
.{ "ondrag", PureGlobalIdentifierValue.other },
|
|
.{ "ondragend", PureGlobalIdentifierValue.other },
|
|
.{ "ondragenter", PureGlobalIdentifierValue.other },
|
|
.{ "ondragleave", PureGlobalIdentifierValue.other },
|
|
.{ "ondragover", PureGlobalIdentifierValue.other },
|
|
.{ "ondragstart", PureGlobalIdentifierValue.other },
|
|
.{ "ondrop", PureGlobalIdentifierValue.other },
|
|
.{ "ondurationchange", PureGlobalIdentifierValue.other },
|
|
.{ "onemptied", PureGlobalIdentifierValue.other },
|
|
.{ "onended", PureGlobalIdentifierValue.other },
|
|
.{ "onerror", PureGlobalIdentifierValue.other },
|
|
.{ "onfocus", PureGlobalIdentifierValue.other },
|
|
.{ "ongotpointercapture", PureGlobalIdentifierValue.other },
|
|
.{ "onhashchange", PureGlobalIdentifierValue.other },
|
|
.{ "oninput", PureGlobalIdentifierValue.other },
|
|
.{ "oninvalid", PureGlobalIdentifierValue.other },
|
|
.{ "onkeydown", PureGlobalIdentifierValue.other },
|
|
.{ "onkeypress", PureGlobalIdentifierValue.other },
|
|
.{ "onkeyup", PureGlobalIdentifierValue.other },
|
|
.{ "onlanguagechange", PureGlobalIdentifierValue.other },
|
|
.{ "onload", PureGlobalIdentifierValue.other },
|
|
.{ "onloadeddata", PureGlobalIdentifierValue.other },
|
|
.{ "onloadedmetadata", PureGlobalIdentifierValue.other },
|
|
.{ "onloadstart", PureGlobalIdentifierValue.other },
|
|
.{ "onlostpointercapture", PureGlobalIdentifierValue.other },
|
|
.{ "onmessage", PureGlobalIdentifierValue.other },
|
|
.{ "onmousedown", PureGlobalIdentifierValue.other },
|
|
.{ "onmouseenter", PureGlobalIdentifierValue.other },
|
|
.{ "onmouseleave", PureGlobalIdentifierValue.other },
|
|
.{ "onmousemove", PureGlobalIdentifierValue.other },
|
|
.{ "onmouseout", PureGlobalIdentifierValue.other },
|
|
.{ "onmouseover", PureGlobalIdentifierValue.other },
|
|
.{ "onmouseup", PureGlobalIdentifierValue.other },
|
|
.{ "onoffline", PureGlobalIdentifierValue.other },
|
|
.{ "ononline", PureGlobalIdentifierValue.other },
|
|
.{ "onpagehide", PureGlobalIdentifierValue.other },
|
|
.{ "onpageshow", PureGlobalIdentifierValue.other },
|
|
.{ "onpause", PureGlobalIdentifierValue.other },
|
|
.{ "onplay", PureGlobalIdentifierValue.other },
|
|
.{ "onplaying", PureGlobalIdentifierValue.other },
|
|
.{ "onpointercancel", PureGlobalIdentifierValue.other },
|
|
.{ "onpointerdown", PureGlobalIdentifierValue.other },
|
|
.{ "onpointerenter", PureGlobalIdentifierValue.other },
|
|
.{ "onpointerleave", PureGlobalIdentifierValue.other },
|
|
.{ "onpointermove", PureGlobalIdentifierValue.other },
|
|
.{ "onpointerout", PureGlobalIdentifierValue.other },
|
|
.{ "onpointerover", PureGlobalIdentifierValue.other },
|
|
.{ "onpointerup", PureGlobalIdentifierValue.other },
|
|
.{ "onpopstate", PureGlobalIdentifierValue.other },
|
|
.{ "onprogress", PureGlobalIdentifierValue.other },
|
|
.{ "onratechange", PureGlobalIdentifierValue.other },
|
|
.{ "onrejectionhandled", PureGlobalIdentifierValue.other },
|
|
.{ "onreset", PureGlobalIdentifierValue.other },
|
|
.{ "onresize", PureGlobalIdentifierValue.other },
|
|
.{ "onscroll", PureGlobalIdentifierValue.other },
|
|
.{ "onseeked", PureGlobalIdentifierValue.other },
|
|
.{ "onseeking", PureGlobalIdentifierValue.other },
|
|
.{ "onselect", PureGlobalIdentifierValue.other },
|
|
.{ "onstalled", PureGlobalIdentifierValue.other },
|
|
.{ "onstorage", PureGlobalIdentifierValue.other },
|
|
.{ "onsubmit", PureGlobalIdentifierValue.other },
|
|
.{ "onsuspend", PureGlobalIdentifierValue.other },
|
|
.{ "ontimeupdate", PureGlobalIdentifierValue.other },
|
|
.{ "ontoggle", PureGlobalIdentifierValue.other },
|
|
.{ "ontransitioncancel", PureGlobalIdentifierValue.other },
|
|
.{ "ontransitionend", PureGlobalIdentifierValue.other },
|
|
.{ "ontransitionrun", PureGlobalIdentifierValue.other },
|
|
.{ "ontransitionstart", PureGlobalIdentifierValue.other },
|
|
.{ "onunhandledrejection", PureGlobalIdentifierValue.other },
|
|
.{ "onunload", PureGlobalIdentifierValue.other },
|
|
.{ "onvolumechange", PureGlobalIdentifierValue.other },
|
|
.{ "onwaiting", PureGlobalIdentifierValue.other },
|
|
.{ "onwebkitanimationend", PureGlobalIdentifierValue.other },
|
|
.{ "onwebkitanimationiteration", PureGlobalIdentifierValue.other },
|
|
.{ "onwebkitanimationstart", PureGlobalIdentifierValue.other },
|
|
.{ "onwebkittransitionend", PureGlobalIdentifierValue.other },
|
|
.{ "onwheel", PureGlobalIdentifierValue.other },
|
|
.{ "open", PureGlobalIdentifierValue.other },
|
|
.{ "opener", PureGlobalIdentifierValue.other },
|
|
.{ "origin", PureGlobalIdentifierValue.other },
|
|
.{ "outerHeight", PureGlobalIdentifierValue.other },
|
|
.{ "outerWidth", PureGlobalIdentifierValue.other },
|
|
.{ "parent", PureGlobalIdentifierValue.other },
|
|
.{ "performance", PureGlobalIdentifierValue.other },
|
|
.{ "personalbar", PureGlobalIdentifierValue.other },
|
|
.{ "postMessage", PureGlobalIdentifierValue.other },
|
|
.{ "print", PureGlobalIdentifierValue.other },
|
|
.{ "prompt", PureGlobalIdentifierValue.other },
|
|
.{ "releaseEvents", PureGlobalIdentifierValue.other },
|
|
.{ "requestAnimationFrame", PureGlobalIdentifierValue.other },
|
|
.{ "resizeBy", PureGlobalIdentifierValue.other },
|
|
.{ "resizeTo", PureGlobalIdentifierValue.other },
|
|
.{ "screen", PureGlobalIdentifierValue.other },
|
|
.{ "screenLeft", PureGlobalIdentifierValue.other },
|
|
.{ "screenTop", PureGlobalIdentifierValue.other },
|
|
.{ "screenX", PureGlobalIdentifierValue.other },
|
|
.{ "screenY", PureGlobalIdentifierValue.other },
|
|
.{ "scroll", PureGlobalIdentifierValue.other },
|
|
.{ "scrollBy", PureGlobalIdentifierValue.other },
|
|
.{ "scrollTo", PureGlobalIdentifierValue.other },
|
|
.{ "scrollbars", PureGlobalIdentifierValue.other },
|
|
.{ "self", PureGlobalIdentifierValue.other },
|
|
.{ "speechSynthesis", PureGlobalIdentifierValue.other },
|
|
.{ "status", PureGlobalIdentifierValue.other },
|
|
.{ "statusbar", PureGlobalIdentifierValue.other },
|
|
.{ "stop", PureGlobalIdentifierValue.other },
|
|
.{ "toolbar", PureGlobalIdentifierValue.other },
|
|
.{ "top", PureGlobalIdentifierValue.other },
|
|
.{ "webkitURL", PureGlobalIdentifierValue.other },
|
|
.{ "window", PureGlobalIdentifierValue.other },
|
|
.{ "crypto", PureGlobalIdentifierValue.other },
|
|
});
|
|
|
|
const string = []const u8;
|
|
|
|
const defines = @import("./defines.zig");
|
|
const std = @import("std");
|
|
|
|
const bun = @import("bun");
|
|
const js_ast = bun.ast;
|