{"action":"opened","issue":{"url":"https://api.github.com/repos/jshint/jshint/issues/3053","repository_url":"https://api.github.com/repos/jshint/jshint","labels_url":"https://api.github.com/repos/jshint/jshint/issues/3053/labels{/name}","comments_url":"https://api.github.com/repos/jshint/jshint/issues/3053/comments","events_url":"https://api.github.com/repos/jshint/jshint/issues/3053/events","html_url":"https://github.com/jshint/jshint/issues/3053","id":184264278,"number":3053,"title":"Missing functions in browser environment","user":{"login":"gagern","id":190759,"avatar_url":"https://avatars.githubusercontent.com/u/190759?v=3","gravatar_id":"","url":"https://api.github.com/users/gagern","html_url":"https://github.com/gagern","followers_url":"https://api.github.com/users/gagern/followers","following_url":"https://api.github.com/users/gagern/following{/other_user}","gists_url":"https://api.github.com/users/gagern/gists{/gist_id}","starred_url":"https://api.github.com/users/gagern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagern/subscriptions","organizations_url":"https://api.github.com/users/gagern/orgs","repos_url":"https://api.github.com/users/gagern/repos","events_url":"https://api.github.com/users/gagern/events{/privacy}","received_events_url":"https://api.github.com/users/gagern/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-20T15:36:22Z","updated_at":"2016-10-20T15:36:22Z","closed_at":null,"body":"I noticed that jshint will complain if I try to construct `ImageData` objects, since it doesn't know that's a global constructor name in the environments of recent browsers. Since I assume this might not be the only such case, I tried to come up with a list of probably missing names. To this effect I grabbed the current WHATWG HTML spec, tried to extract all IDL fragments, dropped those with the `NoInterfaceObject` extended attribute and checked the rest against the `vars.js` file from jshint, namely against the `exmaIdentifiers` and `browser` objects. Here is the result, in the order in which they occur in the HTML specification:\r\n\r\n```\r\nHTMLAllCollection\r\nHTMLFormControlsCollection\r\nRadioNodeList\r\nHTMLOptionsCollection\r\nHTMLUnknownElement\r\nDOMStringMap\r\nHTMLDataElement\r\nHTMLTimeElement\r\nHTMLSpanElement\r\nHTMLPictureElement\r\nHTMLSourceElement\r\nHTMLEmbedElement\r\nHTMLAudioElement\r\nHTMLTrackElement\r\nHTMLMediaElement\r\nMediaError\r\nAudioTrackList\r\nAudioTrack\r\nVideoTrackList\r\nVideoTrack\r\nTextTrackList\r\nTextTrack\r\nTextTrackCueList\r\nTextTrackCue\r\nTimeRanges\r\nTrackEvent\r\nHTMLAreaElement\r\nHTMLDataListElement\r\nHTMLKeygenElement\r\nHTMLOutputElement\r\nHTMLProgressElement\r\nHTMLMeterElement\r\nValidityState\r\nHTMLDetailsElement\r\nHTMLMenuItemElement\r\nRelatedEvent\r\nHTMLDialogElement\r\nHTMLSlotElement\r\nTextMetrics\r\nImageData\r\nPath2D\r\nTouch\r\nImageBitmapRenderingContext\r\nCustomElementRegistry\r\nDataTransfer\r\nDataTransferItemList\r\nDataTransferItem\r\nDragEvent\r\nBarProp\r\nHistory\r\nLocation\r\nPopStateEvent\r\nHashChangeEvent\r\nPageTransitionEvent\r\nBeforeUnloadEvent\r\nApplicationCache\r\nErrorEvent\r\nPromiseRejectionEvent\r\nNavigator\r\nNavigatorID\r\nPluginArray\r\nMimeTypeArray\r\nPlugin\r\nMimeType\r\nImageBitmap\r\nEventSource\r\nCloseEvent\r\nBroadcastChannel\r\nWorkerGlobalScope\r\nDedicatedWorkerGlobalScope\r\nSharedWorkerGlobalScope\r\nWorkerNavigator\r\nWorkerLocation\r\nStorage\r\nStorageEvent\r\nHTMLAppletElement\r\nHTMLMarqueeElement\r\nHTMLAreaElement\r\nHTMLEmbedElement\r\n```\r\n\r\nOut of all of these, some may warrant further (manual) investigation. For example my Chrome doesn't support these (or at least not outside a worker):\r\n\r\n```\r\nAudioTrack\r\nAudioTrackList\r\nDedicatedWorkerGlobalScope\r\nHTMLAppletElement\r\nHTMLDataElement\r\nHTMLMenuItemElement\r\nHTMLTimeElement\r\nImageBitmapRenderingContext\r\nNavigatorID\r\nRelatedEvent\r\nSharedWorkerGlobalScope\r\nVideoTrack\r\nVideoTrackList\r\nWorkerGlobalScope\r\nWorkerLocation\r\nWorkerNavigator\r\n```\r\n\r\nOn my Firefox the list reads\r\n\r\n```\r\nApplicationCache\r\nAudioTrack\r\nAudioTrackList\r\nCustomElementRegistry\r\nDataTransferItem\r\nDataTransferItemList\r\nDedicatedWorkerGlobalScope\r\nHTMLDialogElement\r\nHTMLKeygenElement\r\nHTMLMarqueeElement\r\nHTMLSlotElement\r\nNavigatorID\r\nPromiseRejectionEvent\r\nRelatedEvent\r\nSharedWorkerGlobalScope\r\nTouch\r\nVideoTrack\r\nVideoTrackList\r\nWorkerGlobalScope\r\nWorkerLocation\r\nWorkerNavigator\r\n```\r\n\r\nI'd say although there are some common mismatches, in general the list as a whole should be reasonable. Unless you want to verify each individual item, or have a good idea how and why the results should be filtered in some way, I'd suggest adding all of the names from my first list to the `browser` object.\r\n\r\nIf you want me to write a pull request, please let me know what the boolean value associated with each name signifies. A comment to that effect would be a good idea, in my opinion."}}
{"actor":{"display_login":"gagern"}}