diff --git a/.gitignore b/.gitignore index 239ecff..460b56a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules yarn.lock +browser_vars.json +result_browser_vars.json diff --git a/globals.json b/globals.json index e2375e8..1a12d46 100644 --- a/globals.json +++ b/globals.json @@ -224,327 +224,332 @@ "WeakMap": false, "WeakSet": false }, - "browser": { - "AbortController": false, - "AbortSignal": false, - "addEventListener": false, - "alert": false, - "AnalyserNode": false, - "Animation": false, - "AnimationEffectReadOnly": false, - "AnimationEffectTiming": false, - "AnimationEffectTimingReadOnly": false, - "AnimationEvent": false, - "AnimationPlaybackEvent": false, - "AnimationTimeline": false, - "applicationCache": false, - "ApplicationCache": false, - "ApplicationCacheErrorEvent": false, - "atob": false, - "Attr": false, - "Audio": false, - "AudioBuffer": false, - "AudioBufferSourceNode": false, - "AudioContext": false, - "AudioDestinationNode": false, - "AudioListener": false, - "AudioNode": false, - "AudioParam": false, - "AudioProcessingEvent": false, - "AudioScheduledSourceNode": false, - "AudioWorkletGlobalScope ": false, - "AudioWorkletNode": false, - "AudioWorkletProcessor": false, - "BarProp": false, - "BaseAudioContext": false, - "BatteryManager": false, - "BeforeUnloadEvent": false, - "BiquadFilterNode": false, - "Blob": false, - "BlobEvent": false, - "blur": false, - "BroadcastChannel": false, - "btoa": false, - "BudgetService": false, - "ByteLengthQueuingStrategy": false, - "Cache": false, - "caches": false, - "CacheStorage": false, - "cancelAnimationFrame": false, - "cancelIdleCallback": false, - "CanvasCaptureMediaStreamTrack": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "ChannelMergerNode": false, - "ChannelSplitterNode": false, - "CharacterData": false, - "clearInterval": false, - "clearTimeout": false, - "clientInformation": false, - "ClipboardEvent": false, - "close": false, - "closed": false, - "CloseEvent": false, - "Comment": false, - "CompositionEvent": false, - "confirm": false, - "console": false, - "ConstantSourceNode": false, - "ConvolverNode": false, - "CountQueuingStrategy": false, - "createImageBitmap": false, - "Credential": false, - "CredentialsContainer": false, - "crypto": false, - "Crypto": false, - "CryptoKey": false, - "CSS": false, - "CSSConditionRule": false, - "CSSFontFaceRule": false, - "CSSGroupingRule": false, - "CSSImportRule": false, - "CSSKeyframeRule": false, - "CSSKeyframesRule": false, - "CSSMediaRule": false, - "CSSNamespaceRule": false, - "CSSPageRule": false, - "CSSRule": false, - "CSSRuleList": false, - "CSSStyleDeclaration": false, - "CSSStyleRule": false, - "CSSStyleSheet": false, - "CSSSupportsRule": false, - "CustomElementRegistry": false, - "customElements": false, - "CustomEvent": false, - "DataTransfer": false, - "DataTransferItem": false, - "DataTransferItemList": false, - "defaultstatus": false, - "defaultStatus": false, - "DelayNode": false, - "DeviceMotionEvent": false, - "DeviceOrientationEvent": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "Document": false, - "DocumentFragment": false, - "DocumentType": false, - "DOMError": false, - "DOMException": false, - "DOMImplementation": false, - "DOMMatrix": false, - "DOMMatrixReadOnly": false, - "DOMParser": false, - "DOMPoint": false, - "DOMPointReadOnly": false, - "DOMQuad": false, - "DOMRect": false, - "DOMRectReadOnly": false, - "DOMStringList": false, - "DOMStringMap": false, - "DOMTokenList": false, - "DragEvent": false, - "DynamicsCompressorNode": false, - "Element": false, - "ErrorEvent": false, - "event": false, - "Event": false, - "EventSource": false, - "EventTarget": false, - "external": false, - "fetch": false, - "File": false, - "FileList": false, - "FileReader": false, - "find": false, - "focus": false, - "FocusEvent": false, - "FontFace": false, - "FontFaceSetLoadEvent": false, - "FormData": false, - "frameElement": false, - "frames": false, - "GainNode": false, - "Gamepad": false, - "GamepadButton": false, - "GamepadEvent": false, - "getComputedStyle": false, - "getSelection": false, - "HashChangeEvent": false, - "Headers": false, - "history": false, - "History": false, - "HTMLAllCollection": false, - "HTMLAnchorElement": false, - "HTMLAreaElement": false, - "HTMLAudioElement": false, - "HTMLBaseElement": false, - "HTMLBodyElement": false, - "HTMLBRElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLCollection": false, - "HTMLContentElement": false, - "HTMLDataElement": false, - "HTMLDataListElement": false, - "HTMLDetailsElement": false, - "HTMLDialogElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDListElement": false, - "HTMLDocument": false, - "HTMLElement": false, - "HTMLEmbedElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormControlsCollection": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHRElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLLabelElement": false, - "HTMLLegendElement": false, - "HTMLLIElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMarqueeElement": false, - "HTMLMediaElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLMeterElement": false, - "HTMLModElement": false, - "HTMLObjectElement": false, - "HTMLOListElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLOptionsCollection": false, - "HTMLOutputElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPictureElement": false, - "HTMLPreElement": false, - "HTMLProgressElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLShadowElement": false, - "HTMLSlotElement": false, - "HTMLSourceElement": false, - "HTMLSpanElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTemplateElement": false, - "HTMLTextAreaElement": false, - "HTMLTimeElement": false, - "HTMLTitleElement": false, - "HTMLTrackElement": false, - "HTMLUListElement": false, - "HTMLUnknownElement": false, - "HTMLVideoElement": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "IdleDeadline": false, - "IIRFilterNode": false, - "Image": false, - "ImageBitmap": false, - "ImageBitmapRenderingContext": false, - "ImageCapture": false, - "ImageData": false, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "InputEvent": false, - "IntersectionObserver": false, - "IntersectionObserverEntry": false, - "Intl": false, - "isSecureContext": false, - "KeyboardEvent": false, - "KeyframeEffect": false, - "KeyframeEffectReadOnly": false, - "length": false, - "localStorage": false, + "browser": { + "AbortController": true, + "AbortSignal": true, + "addEventListener": true, + "alert": true, + "AnalyserNode": true, + "Animation": true, + "AnimationEffectReadOnly": true, + "AnimationEffectTiming": true, + "AnimationEffectTimingReadOnly": true, + "AnimationEvent": true, + "AnimationPlaybackEvent": true, + "AnimationTimeline": true, + "applicationCache": true, + "ApplicationCache": true, + "ApplicationCacheErrorEvent": true, + "atob": true, + "Attr": true, + "Audio": true, + "AudioBuffer": true, + "AudioBufferSourceNode": true, + "AudioContext": true, + "AudioDestinationNode": true, + "AudioListener": true, + "AudioNode": true, + "AudioParam": true, + "AudioProcessingEvent": true, + "AudioScheduledSourceNode": true, + "AudioWorkletGlobalScope ": true, + "AudioWorkletNode": true, + "AudioWorkletProcessor": true, + "BarProp": true, + "BaseAudioContext": true, + "BatteryManager": true, + "BeforeUnloadEvent": true, + "BiquadFilterNode": true, + "Blob": true, + "BlobEvent": true, + "blur": true, + "BroadcastChannel": true, + "btoa": true, + "BudgetService": true, + "ByteLengthQueuingStrategy": true, + "Cache": true, + "caches": true, + "CacheStorage": true, + "cancelAnimationFrame": true, + "cancelIdleCallback": true, + "CanvasCaptureMediaStreamTrack": true, + "CanvasGradient": true, + "CanvasPattern": true, + "CanvasRenderingContext2D": true, + "ChannelMergerNode": true, + "ChannelSplitterNode": true, + "CharacterData": true, + "clearInterval": true, + "clearTimeout": true, + "clientInformation": true, + "ClipboardEvent": true, + "close": true, + "closed": true, + "CloseEvent": true, + "Comment": true, + "CompositionEvent": true, + "confirm": true, + "console": true, + "ConstantSourceNode": true, + "ConvolverNode": true, + "CountQueuingStrategy": true, + "createImageBitmap": true, + "Credential": true, + "CredentialsContainer": true, + "crypto": true, + "Crypto": true, + "CryptoKey": true, + "CSS": true, + "CSSConditionRule": true, + "CSSFontFaceRule": true, + "CSSGroupingRule": true, + "CSSImportRule": true, + "CSSKeyframeRule": true, + "CSSKeyframesRule": true, + "CSSMarginRule": true, + "CSSMediaRule": true, + "CSSNamespaceRule": true, + "CSSPageRule": true, + "CSSRule": true, + "CSSRuleList": true, + "CSSStyleDeclaration": true, + "CSSStyleRule": true, + "CSSStyleSheet": true, + "CSSSupportsRule": true, + "CustomElementRegistry": true, + "customElements": true, + "CustomEvent": true, + "DataTransfer": true, + "DataTransferItem": true, + "DataTransferItemList": true, + "defaultstatus": true, + "defaultStatus": true, + "DelayNode": true, + "DeviceMotionEvent": true, + "DeviceOrientationEvent": true, + "devicePixelRatio": true, + "dispatchEvent": true, + "document": true, + "Document": true, + "DocumentFragment": true, + "DocumentType": true, + "DOMError": true, + "DOMException": true, + "DOMImplementation": true, + "DOMMatrix": true, + "DOMMatrixReadOnly": true, + "DOMParser": true, + "DOMPoint": true, + "DOMPointReadOnly": true, + "DOMQuad": true, + "DOMRect": true, + "DOMRectReadOnly": true, + "DOMStringList": true, + "DOMStringMap": true, + "DOMTokenList": true, + "DragEvent": true, + "DynamicsCompressorNode": true, + "Element": true, + "ElementTimeControl": true, + "ErrorEvent": true, + "event": true, + "Event": true, + "EventSource": true, + "EventTarget": true, + "external": true, + "fetch": true, + "File": true, + "FileList": true, + "FileReader": true, + "find": true, + "focus": true, + "FocusEvent": true, + "FontFace": true, + "FontFaceSetLoadEvent": true, + "FormData": true, + "frameElement": true, + "frames": true, + "GainNode": true, + "Gamepad": true, + "GamepadButton": true, + "GamepadEvent": true, + "getComputedStyle": true, + "getSelection": true, + "HashChangeEvent": true, + "Headers": true, + "history": true, + "History": true, + "HTMLAllCollection": true, + "HTMLAnchorElement": true, + "HTMLAreaElement": true, + "HTMLAudioElement": true, + "HTMLBaseElement": true, + "HTMLBlockquoteElement": true, + "HTMLBodyElement": true, + "HTMLBRElement": true, + "HTMLButtonElement": true, + "HTMLCanvasElement": true, + "HTMLCollection": true, + "HTMLContentElement": true, + "HTMLDataElement": true, + "HTMLDataListElement": true, + "HTMLDetailsElement": true, + "HTMLDialogElement": true, + "HTMLDirectoryElement": true, + "HTMLDivElement": true, + "HTMLDListElement": true, + "HTMLDocument": true, + "HTMLElement": true, + "HTMLEmbedElement": true, + "HTMLFieldSetElement": true, + "HTMLFontElement": true, + "HTMLFormControlsCollection": true, + "HTMLFormElement": true, + "HTMLFrameElement": true, + "HTMLFrameSetElement": true, + "HTMLHeadElement": true, + "HTMLHeadingElement": true, + "HTMLHRElement": true, + "HTMLHtmlElement": true, + "HTMLIFrameElement": true, + "HTMLImageElement": true, + "HTMLInputElement": true, + "HTMLIsIndexElement": true, + "HTMLLabelElement": true, + "HTMLLayerElement": true, + "HTMLLegendElement": true, + "HTMLLIElement": true, + "HTMLLinkElement": true, + "HTMLMapElement": true, + "HTMLMarqueeElement": true, + "HTMLMediaElement": true, + "HTMLMenuElement": true, + "HTMLMetaElement": true, + "HTMLMeterElement": true, + "HTMLModElement": true, + "HTMLObjectElement": true, + "HTMLOListElement": true, + "HTMLOptGroupElement": true, + "HTMLOptionElement": true, + "HTMLOptionsCollection": true, + "HTMLOutputElement": true, + "HTMLParagraphElement": true, + "HTMLParamElement": true, + "HTMLPictureElement": true, + "HTMLPreElement": true, + "HTMLProgressElement": true, + "HTMLQuoteElement": true, + "HTMLScriptElement": true, + "HTMLSelectElement": true, + "HTMLShadowElement": true, + "HTMLSlotElement": true, + "HTMLSourceElement": true, + "HTMLSpanElement": true, + "HTMLStyleElement": true, + "HTMLTableCaptionElement": true, + "HTMLTableCellElement": true, + "HTMLTableColElement": true, + "HTMLTableElement": true, + "HTMLTableRowElement": true, + "HTMLTableSectionElement": true, + "HTMLTemplateElement": true, + "HTMLTextAreaElement": true, + "HTMLTimeElement": true, + "HTMLTitleElement": true, + "HTMLTrackElement": true, + "HTMLUListElement": true, + "HTMLUnknownElement": true, + "HTMLVideoElement": true, + "IDBCursor": true, + "IDBCursorWithValue": true, + "IDBDatabase": true, + "IDBFactory": true, + "IDBIndex": true, + "IDBKeyRange": true, + "IDBObjectStore": true, + "IDBOpenDBRequest": true, + "IDBRequest": true, + "IDBTransaction": true, + "IDBVersionChangeEvent": true, + "IdleDeadline": true, + "IIRFilterNode": true, + "Image": true, + "ImageBitmap": true, + "ImageBitmapRenderingContext": true, + "ImageCapture": true, + "ImageData": true, + "indexedDB": true, + "innerHeight": true, + "innerWidth": true, + "InputEvent": true, + "IntersectionObserver": true, + "IntersectionObserverEntry": true, + "Intl": true, + "isSecureContext": true, + "KeyboardEvent": true, + "KeyframeEffect": true, + "KeyframeEffectReadOnly": true, + "length": true, + "localStorage": true, "location": true, - "Location": false, - "locationbar": false, - "matchMedia": false, - "MediaDeviceInfo": false, - "MediaDevices": false, - "MediaElementAudioSourceNode": false, - "MediaEncryptedEvent": false, - "MediaError": false, - "MediaKeyMessageEvent": false, - "MediaKeySession": false, - "MediaKeyStatusMap": false, - "MediaKeySystemAccess": false, - "MediaList": false, - "MediaQueryList": false, - "MediaQueryListEvent": false, - "MediaRecorder": false, - "MediaSettingsRange": false, - "MediaSource": false, - "MediaStream": false, - "MediaStreamAudioDestinationNode": false, - "MediaStreamAudioSourceNode": false, - "MediaStreamEvent": false, - "MediaStreamTrack": false, - "MediaStreamTrackEvent": false, - "menubar": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MIDIAccess": false, - "MIDIConnectionEvent": false, - "MIDIInput": false, - "MIDIInputMap": false, - "MIDIMessageEvent": false, - "MIDIOutput": false, - "MIDIOutputMap": false, - "MIDIPort": false, - "MimeType": false, - "MimeTypeArray": false, - "MouseEvent": false, - "moveBy": false, - "moveTo": false, - "MutationEvent": false, - "MutationObserver": false, - "MutationRecord": false, - "name": false, - "NamedNodeMap": false, - "NavigationPreloadManager": false, - "navigator": false, - "Navigator": false, - "NetworkInformation": false, - "Node": false, - "NodeFilter": false, - "NodeIterator": false, - "NodeList": false, - "Notification": false, - "OfflineAudioCompletionEvent": false, - "OfflineAudioContext": false, - "offscreenBuffering": false, + "Location": true, + "locationbar": true, + "matchMedia": true, + "MediaDeviceInfo": true, + "MediaDevices": true, + "MediaElementAudioSourceNode": true, + "MediaEncryptedEvent": true, + "MediaError": true, + "MediaKeyMessageEvent": true, + "MediaKeySession": true, + "MediaKeyStatusMap": true, + "MediaKeySystemAccess": true, + "MediaList": true, + "MediaQueryList": true, + "MediaQueryListEvent": true, + "MediaRecorder": true, + "MediaSettingsRange": true, + "MediaSource": true, + "MediaStream": true, + "MediaStreamAudioDestinationNode": true, + "MediaStreamAudioSourceNode": true, + "MediaStreamEvent": true, + "MediaStreamTrack": true, + "MediaStreamTrackEvent": true, + "menubar": true, + "MessageChannel": true, + "MessageEvent": true, + "MessagePort": true, + "MIDIAccess": true, + "MIDIConnectionEvent": true, + "MIDIInput": true, + "MIDIInputMap": true, + "MIDIMessageEvent": true, + "MIDIOutput": true, + "MIDIOutputMap": true, + "MIDIPort": true, + "MimeType": true, + "MimeTypeArray": true, + "MouseEvent": true, + "moveBy": true, + "moveTo": true, + "MutationEvent": true, + "MutationObserver": true, + "MutationRecord": true, + "name": true, + "NamedNodeMap": true, + "NavigationPreloadManager": true, + "navigator": true, + "Navigator": true, + "NetworkInformation": true, + "Node": true, + "NodeFilter": true, + "NodeIterator": true, + "NodeList": true, + "Notification": true, + "OfflineAudioCompletionEvent": true, + "OfflineAudioContext": true, + "offscreenBuffering": true, "OffscreenCanvas": true, "onabort": true, "onafterprint": true, @@ -642,294 +647,360 @@ "onvolumechange": true, "onwaiting": true, "onwheel": true, - "open": false, - "openDatabase": false, - "opener": false, - "Option": false, - "origin": false, - "OscillatorNode": false, - "outerHeight": false, - "outerWidth": false, - "PageTransitionEvent": false, - "pageXOffset": false, - "pageYOffset": false, - "PannerNode": false, - "parent": false, - "Path2D": false, - "PaymentAddress": false, - "PaymentRequest": false, - "PaymentRequestUpdateEvent": false, - "PaymentResponse": false, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceLongTaskTiming": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceNavigationTiming": false, - "PerformanceObserver": false, - "PerformanceObserverEntryList": false, - "PerformancePaintTiming": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "PeriodicWave": false, - "Permissions": false, - "PermissionStatus": false, - "personalbar": false, - "PhotoCapabilities": false, - "Plugin": false, - "PluginArray": false, - "PointerEvent": false, - "PopStateEvent": false, - "postMessage": false, - "Presentation": false, - "PresentationAvailability": false, - "PresentationConnection": false, - "PresentationConnectionAvailableEvent": false, - "PresentationConnectionCloseEvent": false, - "PresentationConnectionList": false, - "PresentationReceiver": false, - "PresentationRequest": false, - "print": false, - "ProcessingInstruction": false, - "ProgressEvent": false, - "PromiseRejectionEvent": false, - "prompt": false, - "PushManager": false, - "PushSubscription": false, - "PushSubscriptionOptions": false, - "queueMicrotask": false, - "RadioNodeList": false, - "Range": false, - "ReadableStream": false, - "registerProcessor": false, - "RemotePlayback": false, - "removeEventListener": false, - "Request": false, - "requestAnimationFrame": false, - "requestIdleCallback": false, - "resizeBy": false, - "ResizeObserver": false, - "ResizeObserverEntry": false, - "resizeTo": false, - "Response": false, - "RTCCertificate": false, - "RTCDataChannel": false, - "RTCDataChannelEvent": false, - "RTCDtlsTransport": false, - "RTCIceCandidate": false, - "RTCIceGatherer": false, - "RTCIceTransport": false, - "RTCPeerConnection": false, - "RTCPeerConnectionIceEvent": false, - "RTCRtpContributingSource": false, - "RTCRtpReceiver": false, - "RTCRtpSender": false, - "RTCSctpTransport": false, - "RTCSessionDescription": false, - "RTCStatsReport": false, - "RTCTrackEvent": false, - "screen": false, - "Screen": false, - "screenLeft": false, - "ScreenOrientation": false, - "screenTop": false, - "screenX": false, - "screenY": false, - "ScriptProcessorNode": false, - "scroll": false, - "scrollbars": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "SecurityPolicyViolationEvent": false, - "Selection": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerRegistration": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "ShadowRoot": false, - "SharedWorker": false, - "SourceBuffer": false, - "SourceBufferList": false, - "speechSynthesis": false, - "SpeechSynthesisEvent": false, - "SpeechSynthesisUtterance": false, - "StaticRange": false, - "status": false, - "statusbar": false, - "StereoPannerNode": false, - "stop": false, - "Storage": false, - "StorageEvent": false, - "StorageManager": false, - "styleMedia": false, - "StyleSheet": false, - "StyleSheetList": false, - "SubtleCrypto": false, - "SVGAElement": false, - "SVGAngle": false, - "SVGAnimatedAngle": false, - "SVGAnimatedBoolean": false, - "SVGAnimatedEnumeration": false, - "SVGAnimatedInteger": false, - "SVGAnimatedLength": false, - "SVGAnimatedLengthList": false, - "SVGAnimatedNumber": false, - "SVGAnimatedNumberList": false, - "SVGAnimatedPreserveAspectRatio": false, - "SVGAnimatedRect": false, - "SVGAnimatedString": false, - "SVGAnimatedTransformList": false, - "SVGAnimateElement": false, - "SVGAnimateMotionElement": false, - "SVGAnimateTransformElement": false, - "SVGAnimationElement": false, - "SVGCircleElement": false, - "SVGClipPathElement": false, - "SVGComponentTransferFunctionElement": false, - "SVGDefsElement": false, - "SVGDescElement": false, - "SVGDiscardElement": false, - "SVGElement": false, - "SVGEllipseElement": false, - "SVGFEBlendElement": false, - "SVGFEColorMatrixElement": false, - "SVGFEComponentTransferElement": false, - "SVGFECompositeElement": false, - "SVGFEConvolveMatrixElement": false, - "SVGFEDiffuseLightingElement": false, - "SVGFEDisplacementMapElement": false, - "SVGFEDistantLightElement": false, - "SVGFEDropShadowElement": false, - "SVGFEFloodElement": false, - "SVGFEFuncAElement": false, - "SVGFEFuncBElement": false, - "SVGFEFuncGElement": false, - "SVGFEFuncRElement": false, - "SVGFEGaussianBlurElement": false, - "SVGFEImageElement": false, - "SVGFEMergeElement": false, - "SVGFEMergeNodeElement": false, - "SVGFEMorphologyElement": false, - "SVGFEOffsetElement": false, - "SVGFEPointLightElement": false, - "SVGFESpecularLightingElement": false, - "SVGFESpotLightElement": false, - "SVGFETileElement": false, - "SVGFETurbulenceElement": false, - "SVGFilterElement": false, - "SVGForeignObjectElement": false, - "SVGGElement": false, - "SVGGeometryElement": false, - "SVGGradientElement": false, - "SVGGraphicsElement": false, - "SVGImageElement": false, - "SVGLength": false, - "SVGLengthList": false, - "SVGLinearGradientElement": false, - "SVGLineElement": false, - "SVGMarkerElement": false, - "SVGMaskElement": false, - "SVGMatrix": false, - "SVGMetadataElement": false, - "SVGMPathElement": false, - "SVGNumber": false, - "SVGNumberList": false, - "SVGPathElement": false, - "SVGPatternElement": false, - "SVGPoint": false, - "SVGPointList": false, - "SVGPolygonElement": false, - "SVGPolylineElement": false, - "SVGPreserveAspectRatio": false, - "SVGRadialGradientElement": false, - "SVGRect": false, - "SVGRectElement": false, - "SVGScriptElement": false, - "SVGSetElement": false, - "SVGStopElement": false, - "SVGStringList": false, - "SVGStyleElement": false, - "SVGSVGElement": false, - "SVGSwitchElement": false, - "SVGSymbolElement": false, - "SVGTextContentElement": false, - "SVGTextElement": false, - "SVGTextPathElement": false, - "SVGTextPositioningElement": false, - "SVGTitleElement": false, - "SVGTransform": false, - "SVGTransformList": false, - "SVGTSpanElement": false, - "SVGUnitTypes": false, - "SVGUseElement": false, - "SVGViewElement": false, - "TaskAttributionTiming": false, - "Text": false, - "TextDecoder": false, - "TextEncoder": false, - "TextEvent": false, - "TextMetrics": false, - "TextTrack": false, - "TextTrackCue": false, - "TextTrackCueList": false, - "TextTrackList": false, - "TimeRanges": false, - "toolbar": false, - "top": false, - "Touch": false, - "TouchEvent": false, - "TouchList": false, - "TrackEvent": false, - "TransitionEvent": false, - "TreeWalker": false, - "UIEvent": false, - "URL": false, - "URLSearchParams": false, - "ValidityState": false, - "visualViewport": false, - "VisualViewport": false, - "VTTCue": false, - "WaveShaperNode": false, - "WebAssembly": false, - "WebGL2RenderingContext": false, - "WebGLActiveInfo": false, - "WebGLBuffer": false, - "WebGLContextEvent": false, - "WebGLFramebuffer": false, - "WebGLProgram": false, - "WebGLQuery": false, - "WebGLRenderbuffer": false, - "WebGLRenderingContext": false, - "WebGLSampler": false, - "WebGLShader": false, - "WebGLShaderPrecisionFormat": false, - "WebGLSync": false, - "WebGLTexture": false, - "WebGLTransformFeedback": false, - "WebGLUniformLocation": false, - "WebGLVertexArrayObject": false, - "WebSocket": false, - "WheelEvent": false, - "window": false, - "Window": false, - "Worker": false, - "WritableStream": false, - "XMLDocument": false, - "XMLHttpRequest": false, - "XMLHttpRequestEventTarget": false, - "XMLHttpRequestUpload": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathExpression": false, - "XPathResult": false, - "XSLTProcessor": false + "open": true, + "openDatabase": true, + "opener": true, + "Option": true, + "origin": true, + "OscillatorNode": true, + "outerHeight": true, + "outerWidth": true, + "PageTransitionEvent": true, + "pageXOffset": true, + "pageYOffset": true, + "PannerNode": true, + "parent": true, + "Path2D": true, + "PaymentAddress": true, + "PaymentRequest": true, + "PaymentRequestUpdateEvent": true, + "PaymentResponse": true, + "performance": true, + "Performance": true, + "PerformanceEntry": true, + "PerformanceLongTaskTiming": true, + "PerformanceMark": true, + "PerformanceMeasure": true, + "PerformanceNavigation": true, + "PerformanceNavigationTiming": true, + "PerformanceObserver": true, + "PerformanceObserverEntryList": true, + "PerformancePaintTiming": true, + "PerformanceResourceTiming": true, + "PerformanceTiming": true, + "PeriodicWave": true, + "Permissions": true, + "PermissionStatus": true, + "personalbar": true, + "PhotoCapabilities": true, + "Plugin": true, + "PluginArray": true, + "PointerEvent": true, + "PopStateEvent": true, + "postMessage": true, + "Presentation": true, + "PresentationAvailability": true, + "PresentationConnection": true, + "PresentationConnectionAvailableEvent": true, + "PresentationConnectionCloseEvent": true, + "PresentationConnectionList": true, + "PresentationReceiver": true, + "PresentationRequest": true, + "print": true, + "ProcessingInstruction": true, + "ProgressEvent": true, + "PromiseRejectionEvent": true, + "prompt": true, + "PushManager": true, + "PushSubscription": true, + "PushSubscriptionOptions": true, + "queueMicrotask": true, + "RadioNodeList": true, + "Range": true, + "ReadableStream": true, + "registerProcessor": true, + "RemotePlayback": true, + "removeEventListener": true, + "Request": true, + "requestAnimationFrame": true, + "requestIdleCallback": true, + "resizeBy": true, + "ResizeObserver": true, + "ResizeObserverEntry": true, + "resizeTo": true, + "Response": true, + "RTCCertificate": true, + "RTCDataChannel": true, + "RTCDataChannelEvent": true, + "RTCDtlsTransport": true, + "RTCIceCandidate": true, + "RTCIceGatherer": true, + "RTCIceTransport": true, + "RTCPeerConnection": true, + "RTCPeerConnectionIceEvent": true, + "RTCRtpContributingSource": true, + "RTCRtpReceiver": true, + "RTCRtpSender": true, + "RTCSctpTransport": true, + "RTCSessionDescription": true, + "RTCStatsReport": true, + "RTCTrackEvent": true, + "screen": true, + "Screen": true, + "screenLeft": true, + "ScreenOrientation": true, + "screenTop": true, + "screenX": true, + "screenY": true, + "ScriptProcessorNode": true, + "scroll": true, + "scrollbars": true, + "scrollBy": true, + "scrollTo": true, + "scrollX": true, + "scrollY": true, + "SecurityPolicyViolationEvent": true, + "Selection": true, + "self": true, + "ServiceWorker": true, + "ServiceWorkerContainer": true, + "ServiceWorkerRegistration": true, + "sessionStorage": true, + "setInterval": true, + "setTimeout": true, + "ShadowRoot": true, + "SharedWorker": true, + "SourceBuffer": true, + "SourceBufferList": true, + "speechSynthesis": true, + "SpeechSynthesisEvent": true, + "SpeechSynthesisUtterance": true, + "StaticRange": true, + "status": true, + "statusbar": true, + "StereoPannerNode": true, + "stop": true, + "Storage": true, + "StorageEvent": true, + "StorageManager": true, + "styleMedia": true, + "StyleSheet": true, + "StyleSheetList": true, + "SubtleCrypto": true, + "SVGAElement": true, + "SVGAltGlyphDefElement": true, + "SVGAltGlyphElement": true, + "SVGAltGlyphItemElement": true, + "SVGAngle": true, + "SVGAnimateColorElement": true, + "SVGAnimatedAngle": true, + "SVGAnimatedBoolean": true, + "SVGAnimatedEnumeration": true, + "SVGAnimatedInteger": true, + "SVGAnimatedLength": true, + "SVGAnimatedLengthList": true, + "SVGAnimatedNumber": true, + "SVGAnimatedNumberList": true, + "SVGAnimatedPathData": true, + "SVGAnimatedPoints": true, + "SVGAnimatedPreserveAspectRatio": true, + "SVGAnimatedRect": true, + "SVGAnimatedString": true, + "SVGAnimatedTransformList": true, + "SVGAnimateElement": true, + "SVGAnimateMotionElement": true, + "SVGAnimateTransformElement": true, + "SVGAnimationElement": true, + "SVGCircleElement": true, + "SVGClipPathElement": true, + "SVGColor": true, + "SVGColorProfileElement": true, + "SVGColorProfileRule": true, + "SVGComponentTransferFunctionElement": true, + "SVGCSSRule": true, + "SVGCursorElement": true, + "SVGDefsElement": true, + "SVGDescElement": true, + "SVGDiscardElement": true, + "SVGDocument": true, + "SVGElement": true, + "SVGElementInstance": true, + "SVGElementInstanceList": true, + "SVGEllipseElement": true, + "SVGExternalResourcesRequired": true, + "SVGFEBlendElement": true, + "SVGFEColorMatrixElement": true, + "SVGFEComponentTransferElement": true, + "SVGFECompositeElement": true, + "SVGFEConvolveMatrixElement": true, + "SVGFEDiffuseLightingElement": true, + "SVGFEDisplacementMapElement": true, + "SVGFEDistantLightElement": true, + "SVGFEDropShadowElement": true, + "SVGFEFloodElement": true, + "SVGFEFuncAElement": true, + "SVGFEFuncBElement": true, + "SVGFEFuncGElement": true, + "SVGFEFuncRElement": true, + "SVGFEGaussianBlurElement": true, + "SVGFEImageElement": true, + "SVGFEMergeElement": true, + "SVGFEMergeNodeElement": true, + "SVGFEMorphologyElement": true, + "SVGFEOffsetElement": true, + "SVGFEPointLightElement": true, + "SVGFESpecularLightingElement": true, + "SVGFESpotLightElement": true, + "SVGFETileElement": true, + "SVGFETurbulenceElement": true, + "SVGFilterElement": true, + "SVGFilterPrimitiveStandardAttributes": true, + "SVGFitToViewBox": true, + "SVGFontElement": true, + "SVGFontFaceElement": true, + "SVGFontFaceFormatElement": true, + "SVGFontFaceNameElement": true, + "SVGFontFaceSrcElement": true, + "SVGFontFaceUriElement": true, + "SVGForeignObjectElement": true, + "SVGGElement": true, + "SVGGeometryElement": true, + "SVGGlyphElement": true, + "SVGGlyphRefElement": true, + "SVGGradientElement": true, + "SVGGraphicsElement": true, + "SVGHKernElement": true, + "SVGICCColor": true, + "SVGImageElement": true, + "SVGLangSpace": true, + "SVGLength": true, + "SVGLengthList": true, + "SVGLinearGradientElement": true, + "SVGLineElement": true, + "SVGLocatable": true, + "SVGMarkerElement": true, + "SVGMaskElement": true, + "SVGMatrix": true, + "SVGMetadataElement": true, + "SVGMissingGlyphElement": true, + "SVGMPathElement": true, + "SVGNumber": true, + "SVGNumberList": true, + "SVGPaint": true, + "SVGPathElement": true, + "SVGPathSeg": true, + "SVGPathSegArcAbs": true, + "SVGPathSegArcRel": true, + "SVGPathSegClosePath": true, + "SVGPathSegCurvetoCubicAbs": true, + "SVGPathSegCurvetoCubicRel": true, + "SVGPathSegCurvetoCubicSmoothAbs": true, + "SVGPathSegCurvetoCubicSmoothRel": true, + "SVGPathSegCurvetoQuadraticAbs": true, + "SVGPathSegCurvetoQuadraticRel": true, + "SVGPathSegCurvetoQuadraticSmoothAbs": true, + "SVGPathSegCurvetoQuadraticSmoothRel": true, + "SVGPathSegLinetoAbs": true, + "SVGPathSegLinetoHorizontalAbs": true, + "SVGPathSegLinetoHorizontalRel": true, + "SVGPathSegLinetoRel": true, + "SVGPathSegLinetoVerticalAbs": true, + "SVGPathSegLinetoVerticalRel": true, + "SVGPathSegList": true, + "SVGPathSegMovetoAbs": true, + "SVGPathSegMovetoRel": true, + "SVGPatternElement": true, + "SVGPoint": true, + "SVGPointList": true, + "SVGPolygonElement": true, + "SVGPolylineElement": true, + "SVGPreserveAspectRatio": true, + "SVGRadialGradientElement": true, + "SVGRect": true, + "SVGRectElement": true, + "SVGRenderingIntent": true, + "SVGScriptElement": true, + "SVGSetElement": true, + "SVGStopElement": true, + "SVGStringList": true, + "SVGStylable": true, + "SVGStyleElement": true, + "SVGSVGElement": true, + "SVGSwitchElement": true, + "SVGSymbolElement": true, + "SVGTests": true, + "SVGTextContentElement": true, + "SVGTextElement": true, + "SVGTextPathElement": true, + "SVGTextPositioningElement": true, + "SVGTitleElement": true, + "SVGTransform": true, + "SVGTransformable": true, + "SVGTransformList": true, + "SVGTRefElement": true, + "SVGTSpanElement": true, + "SVGUnitTypes": true, + "SVGURIReference": true, + "SVGUseElement": true, + "SVGViewElement": true, + "SVGViewSpec": true, + "SVGVKernElement": true, + "SVGZoomAndPan": true, + "TaskAttributionTiming": true, + "Text": true, + "TextDecoder": true, + "TextEncoder": true, + "TextEvent": true, + "TextMetrics": true, + "TextTrack": true, + "TextTrackCue": true, + "TextTrackCueList": true, + "TextTrackList": true, + "TimeEvent": true, + "TimeRanges": true, + "toolbar": true, + "top": true, + "Touch": true, + "TouchEvent": true, + "TouchList": true, + "TrackEvent": true, + "TransitionEvent": true, + "TreeWalker": true, + "UIEvent": true, + "URL": true, + "URLSearchParams": true, + "ValidityState": true, + "visualViewport": true, + "VisualViewport": true, + "VTTCue": true, + "WaveShaperNode": true, + "WebAssembly": true, + "WebGL2RenderingContext": true, + "WebGLActiveInfo": true, + "WebGLBuffer": true, + "WebGLContextEvent": true, + "WebGLFramebuffer": true, + "WebGLProgram": true, + "WebGLQuery": true, + "WebGLRenderbuffer": true, + "WebGLRenderingContext": true, + "WebGLSampler": true, + "WebGLShader": true, + "WebGLShaderPrecisionFormat": true, + "WebGLSync": true, + "WebGLTexture": true, + "WebGLTransformFeedback": true, + "WebGLUniformLocation": true, + "WebGLVertexArrayObject": true, + "WebSocket": true, + "WheelEvent": true, + "window": true, + "Window": true, + "Worker": true, + "WritableStream": true, + "XDomainRequest": true, + "XMLDocument": true, + "XMLHttpRequest": true, + "XMLHttpRequestEventTarget": true, + "XMLHttpRequestUpload": true, + "XMLSerializer": true, + "XPathEvaluator": true, + "XPathException": true, + "XPathExpression": true, + "XPathNamespace": true, + "XPathNSResolver": true, + "XPathResult": true, + "XSLTProcessor": true }, "worker": { "addEventListener": false, diff --git a/package.json b/package.json index 3f6f52d..549f30d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "node": ">=8" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava", + "get-jshint-browser": "node ./update/get-browser-globals/jshint.js", + "combine-browser": "node ./update/get-browser-globals/combine.js" }, "files": [ "index.js", @@ -36,12 +38,15 @@ }, "devDependencies": { "ava": "^2.2.0", + "jshint": "git+https://git@github.com/shapkarin/jshint.git#master", "tsd": "^0.9.0", "xo": "^0.25.3" }, "xo": { "ignores": [ - "get-browser-globals.js" + "update/get-browser-globals/browser.js", + "update/get-browser-globals/combine.js", + "update/get-browser-globals/jshint.js" ] }, "tsd": { diff --git a/readme.md b/readme.md index fdcfa08..c33345f 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ > Global identifiers from different JavaScript environments -Extracted from [JSHint](https://github.com/jshint/jshint/blob/3a8efa979dbb157bfb5c10b5826603a55a33b9ad/src/vars.js) and [ESLint](https://github.com/eslint/eslint/blob/b648406218f8a2d7302b98f5565e23199f44eb31/conf/environments.json) and merged. +Extracted from [JSHint](https://github.com/jshint/jshint/blob/1013d51d8ca8cfe4ed3d8b54835c9c181c5ac7b7/src/vars.js#L74). It's just a [JSON file](globals.json), so use it in whatever environment you like. diff --git a/get-browser-globals.js b/update/get-browser-globals/browser.js similarity index 74% rename from get-browser-globals.js rename to update/get-browser-globals/browser.js index 73d849a..a87d936 100644 --- a/get-browser-globals.js +++ b/update/get-browser-globals/browser.js @@ -43,7 +43,7 @@ const blacklist = [ ]; const globals = Object.getOwnPropertyNames(window) - .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())) + .sort((a, b) => a.localeCompare(b)) .filter(global => { for (const pattern of blacklist) { if (typeof pattern === 'string') { @@ -66,10 +66,3 @@ for (const key of globals) { } copy(JSON.stringify(ret, null, '\t')); - -/* - -Usage: -Open an Incognito window in Chrome Canary and paste the above into the console. You'll now have a new object in your clipboard for the `browser` field in `globals.json`. You still need to manually filter out items from the `builtin` list. - -*/ diff --git a/update/get-browser-globals/combine.js b/update/get-browser-globals/combine.js new file mode 100644 index 0000000..0e20d9c --- /dev/null +++ b/update/get-browser-globals/combine.js @@ -0,0 +1,25 @@ +'use strict'; + +const fs = require('fs'); + +const json = require('../../browser_vars.json'); + +const diffArray = function(oneObj, otherObj){ + const defaultKeys = Object.keys(oneObj); + const yours = Object.keys(otherObj); + + return defaultKeys.filter(key => !yours.includes(key)); +}; + +const jshint = json['jshint']; +const my = json['my']; + +const difference = diffArray(jshint, my); +const { browser } = require('../../globals.json'); + +const result = [...Object.keys(browser), ...difference] + .sort((a, b) => a.localeCompare(b)) + .reduce((acc, cur) => ({ ...acc, [cur]: true}), {}); + +fs.writeFileSync('./result_browser_vars.json', `{ "result": \n\t${JSON.stringify(result, null, '\t\t')}\n}`); + diff --git a/update/get-browser-globals/jshint.js b/update/get-browser-globals/jshint.js new file mode 100644 index 0000000..4eec46d --- /dev/null +++ b/update/get-browser-globals/jshint.js @@ -0,0 +1,73 @@ +'use strict'; + +const fs = require('fs'); + +const { browser } = require('jshint/src/vars.js'); + + +const blacklist = [ + /^webkit/i, + 'BeforeInstallPromptEvent', + /^Bluetooth/, + 'CDATASection', + 'captureEvents', + 'InputDeviceCapabilities', + 'releaseEvents', + 'SyncManager', + /^USB/, + + // DevTools globals + 'chrome', + '$_', + '$0', + '$1', + '$2', + '$3', + '$4', + '$', + '$$', + '$x', + 'clear', + 'copy', + 'debug', + 'dir', + 'dirxml', + 'getEventListeners', + 'inspect', + 'keys', + 'monitor', + 'monitorEvents', + 'profile', + 'profileEnd', + 'queryObjects', + 'table', + 'undebug', + 'unmonitor', + 'unmonitorEvents', + 'values' +]; + +const globals = Object.getOwnPropertyNames(browser) + .sort((a, b) => a.localeCompare(b)) + .filter(global => { + for (const pattern of blacklist) { + if (typeof pattern === 'string') { + if (global === pattern) { + return false; + } + } else { + if (pattern.test(global)) { + return false; + } + } + } + + return true; + }); + +const ret = {}; +for (const key of globals) { + ret[key] = key.startsWith('on'); +} + +fs.writeFileSync('./browser_vars.json', `{ "jshint": \n\t${JSON.stringify(ret, null, '\t\t')},\n"my":\n\n}`); diff --git a/update/get-browser-globals/readme.md b/update/get-browser-globals/readme.md new file mode 100644 index 0000000..a9bffe0 --- /dev/null +++ b/update/get-browser-globals/readme.md @@ -0,0 +1,8 @@ +### Usage +- Run `npm run get-jshint-browser`. +- Open an Incognito window in Chrome Canary and paste the above into the console. +- You'll now have a new object in your clipboard. +- Open file `browser_vars.json` +- Paste yours current clipboard to the field `my` at the root of the project. +- run `npm run combine-browser` +- Copy and paste the result from the `result_browser_vars.json` to the field `browser` at the `globals.json`