Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 27 Sep 2019 15:26:14 +0000
changeset 495397 2416d17d33c1c6774e62f786aaeff6c02462a5bd
parent 495396 7cdac547615052bd2dcd017eac0e78343005eb7f
child 495398 fbfdd8ee1b42fb2d863b1d669a6047087d7e0595
push id36628
push useraciure@mozilla.com
push dateSat, 28 Sep 2019 09:46:05 +0000
treeherdermozilla-central@72a8d8c20180 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedgar
bugs1423562
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar For review purposes, the important changes are in dom/bindings/Configuration.py and dom/bindings/parser. The changes to the IDL files were done by running these in dom/webidl and dom/bindings/test: perl -pi -e 's/^interface ([A-Za-z0-9_]+)($| [:{])/[Exposed=Window]\ninterface \1\2/' *.webidl perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor\]\n\[Exposed=Window\]/[HTMLConstructor,\n Exposed=Window]/g' *.webidl perl -pi -e 'BEGIN { $/ = undef; } s/\[NoInterfaceObject\]\n\[Exposed=Window\]/[NoInterfaceObject,\n Exposed=Window]/g' *.webidl perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\n\[Exposed=Window\]/[ChromeOnly,\n Exposed=Window]/g' *.webidl And running this in dom/chrome-webidl: perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\ninterface/[ChromeOnly, Exposed=Window]\ninterface/g' *.webidl and then fixing all the resulting parser failures. I then verified that the generated code is the same as before this change. Differential Revision: https://phabricator.services.mozilla.com/D46697
dom/bindings/BindingUtils.h
dom/bindings/Configuration.py
dom/bindings/parser/WebIDL.py
dom/bindings/parser/tests/test_constructor_global.py
dom/bindings/parser/tests/test_exposed_extended_attribute.py
dom/bindings/parser/tests/test_global_extended_attr.py
dom/bindings/parser/tests/test_interface.py
dom/bindings/parser/tests/test_interfacemixin.py
dom/bindings/test/TestCodeGen.webidl
dom/bindings/test/TestExampleGen.webidl
dom/bindings/test/TestJSImplGen.webidl
dom/bindings/test/TestJSImplInheritanceGen.webidl
dom/chrome-webidl/DOMLocalization.webidl
dom/chrome-webidl/DebuggerNotification.webidl
dom/chrome-webidl/DocumentL10n.webidl
dom/chrome-webidl/Flex.webidl
dom/chrome-webidl/InspectorUtils.webidl
dom/chrome-webidl/JSWindowActor.webidl
dom/chrome-webidl/L10nOverlays.webidl
dom/chrome-webidl/Localization.webidl
dom/chrome-webidl/MessageManager.webidl
dom/chrome-webidl/MozDocumentObserver.webidl
dom/chrome-webidl/MozSharedMap.webidl
dom/chrome-webidl/MozStorageAsyncStatementParams.webidl
dom/chrome-webidl/MozStorageStatementParams.webidl
dom/chrome-webidl/MozStorageStatementRow.webidl
dom/chrome-webidl/PromiseDebugging.webidl
dom/chrome-webidl/XULFrameElement.webidl
dom/chrome-webidl/XULMenuElement.webidl
dom/chrome-webidl/XULTextElement.webidl
dom/chrome-webidl/XULTreeElement.webidl
dom/webidl/APZTestData.webidl
dom/webidl/AbstractRange.webidl
dom/webidl/AccessibleNode.webidl
dom/webidl/AddonEvent.webidl
dom/webidl/AddonManager.webidl
dom/webidl/AnalyserNode.webidl
dom/webidl/Animation.webidl
dom/webidl/AnimationEffect.webidl
dom/webidl/AnimationEvent.webidl
dom/webidl/AnimationPlaybackEvent.webidl
dom/webidl/AnimationTimeline.webidl
dom/webidl/AnonymousContent.webidl
dom/webidl/Attr.webidl
dom/webidl/AudioBuffer.webidl
dom/webidl/AudioBufferSourceNode.webidl
dom/webidl/AudioContext.webidl
dom/webidl/AudioDestinationNode.webidl
dom/webidl/AudioListener.webidl
dom/webidl/AudioNode.webidl
dom/webidl/AudioParam.webidl
dom/webidl/AudioParamMap.webidl
dom/webidl/AudioProcessingEvent.webidl
dom/webidl/AudioScheduledSourceNode.webidl
dom/webidl/AudioTrack.webidl
dom/webidl/AudioTrackList.webidl
dom/webidl/AudioWorklet.webidl
dom/webidl/AudioWorkletNode.webidl
dom/webidl/BarProp.webidl
dom/webidl/BaseAudioContext.webidl
dom/webidl/BatteryManager.webidl
dom/webidl/BeforeUnloadEvent.webidl
dom/webidl/BiquadFilterNode.webidl
dom/webidl/BlobEvent.webidl
dom/webidl/CDATASection.webidl
dom/webidl/CSS.webidl
dom/webidl/CSS2Properties.webidl.in
dom/webidl/CSSAnimation.webidl
dom/webidl/CSSConditionRule.webidl
dom/webidl/CSSCounterStyleRule.webidl
dom/webidl/CSSFontFaceRule.webidl
dom/webidl/CSSFontFeatureValuesRule.webidl
dom/webidl/CSSGroupingRule.webidl
dom/webidl/CSSImportRule.webidl
dom/webidl/CSSKeyframeRule.webidl
dom/webidl/CSSKeyframesRule.webidl
dom/webidl/CSSMediaRule.webidl
dom/webidl/CSSMozDocumentRule.webidl
dom/webidl/CSSNamespaceRule.webidl
dom/webidl/CSSPageRule.webidl
dom/webidl/CSSPseudoElement.webidl
dom/webidl/CSSRule.webidl
dom/webidl/CSSRuleList.webidl
dom/webidl/CSSStyleDeclaration.webidl
dom/webidl/CSSStyleRule.webidl
dom/webidl/CSSStyleSheet.webidl
dom/webidl/CSSSupportsRule.webidl
dom/webidl/CSSTransition.webidl
dom/webidl/CanvasCaptureMediaStream.webidl
dom/webidl/CanvasRenderingContext2D.webidl
dom/webidl/CaretPosition.webidl
dom/webidl/CaretStateChangedEvent.webidl
dom/webidl/ChannelMergerNode.webidl
dom/webidl/ChannelSplitterNode.webidl
dom/webidl/CharacterData.webidl
dom/webidl/CheckerboardReportService.webidl
dom/webidl/ChildSHistory.webidl
dom/webidl/ChromeNodeList.webidl
dom/webidl/Clipboard.webidl
dom/webidl/ClipboardEvent.webidl
dom/webidl/CommandEvent.webidl
dom/webidl/Comment.webidl
dom/webidl/CompositionEvent.webidl
dom/webidl/ConstantSourceNode.webidl
dom/webidl/ConvolverNode.webidl
dom/webidl/Coordinates.webidl
dom/webidl/CreateOfferRequest.webidl
dom/webidl/CustomElementRegistry.webidl
dom/webidl/DOMImplementation.webidl
dom/webidl/DOMParser.webidl
dom/webidl/DOMRectList.webidl
dom/webidl/DOMStringMap.webidl
dom/webidl/DOMTokenList.webidl
dom/webidl/DataTransfer.webidl
dom/webidl/DataTransferItem.webidl
dom/webidl/DataTransferItemList.webidl
dom/webidl/DelayNode.webidl
dom/webidl/DeviceLightEvent.webidl
dom/webidl/DeviceMotionEvent.webidl
dom/webidl/DeviceOrientationEvent.webidl
dom/webidl/DeviceProximityEvent.webidl
dom/webidl/Document.webidl
dom/webidl/DocumentFragment.webidl
dom/webidl/DocumentTimeline.webidl
dom/webidl/DocumentType.webidl
dom/webidl/DragEvent.webidl
dom/webidl/DynamicsCompressorNode.webidl
dom/webidl/Element.webidl
dom/webidl/EventListener.webidl
dom/webidl/External.webidl
dom/webidl/FeaturePolicy.webidl
dom/webidl/FetchObserver.webidl
dom/webidl/FileSystem.webidl
dom/webidl/FileSystemDirectoryEntry.webidl
dom/webidl/FileSystemDirectoryReader.webidl
dom/webidl/FileSystemEntry.webidl
dom/webidl/FileSystemFileEntry.webidl
dom/webidl/FocusEvent.webidl
dom/webidl/FontFace.webidl
dom/webidl/FontFaceSet.webidl
dom/webidl/FontFaceSetLoadEvent.webidl
dom/webidl/FrameCrashedEvent.webidl
dom/webidl/FrameLoader.webidl
dom/webidl/FuzzingFunctions.webidl
dom/webidl/GainNode.webidl
dom/webidl/Gamepad.webidl
dom/webidl/GamepadAxisMoveEvent.webidl
dom/webidl/GamepadButtonEvent.webidl
dom/webidl/GamepadEvent.webidl
dom/webidl/GamepadHapticActuator.webidl
dom/webidl/GamepadLightIndicator.webidl
dom/webidl/GamepadPose.webidl
dom/webidl/GamepadServiceTest.webidl
dom/webidl/GamepadTouch.webidl
dom/webidl/Geolocation.webidl
dom/webidl/GetUserMediaRequest.webidl
dom/webidl/Grid.webidl
dom/webidl/HTMLAllCollection.webidl
dom/webidl/HTMLAnchorElement.webidl
dom/webidl/HTMLAreaElement.webidl
dom/webidl/HTMLAudioElement.webidl
dom/webidl/HTMLBRElement.webidl
dom/webidl/HTMLBaseElement.webidl
dom/webidl/HTMLBodyElement.webidl
dom/webidl/HTMLButtonElement.webidl
dom/webidl/HTMLCanvasElement.webidl
dom/webidl/HTMLCollection.webidl
dom/webidl/HTMLDListElement.webidl
dom/webidl/HTMLDataElement.webidl
dom/webidl/HTMLDataListElement.webidl
dom/webidl/HTMLDetailsElement.webidl
dom/webidl/HTMLDialogElement.webidl
dom/webidl/HTMLDirectoryElement.webidl
dom/webidl/HTMLDivElement.webidl
dom/webidl/HTMLDocument.webidl
dom/webidl/HTMLElement.webidl
dom/webidl/HTMLEmbedElement.webidl
dom/webidl/HTMLFieldSetElement.webidl
dom/webidl/HTMLFontElement.webidl
dom/webidl/HTMLFormControlsCollection.webidl
dom/webidl/HTMLFormElement.webidl
dom/webidl/HTMLFrameElement.webidl
dom/webidl/HTMLFrameSetElement.webidl
dom/webidl/HTMLHRElement.webidl
dom/webidl/HTMLHeadElement.webidl
dom/webidl/HTMLHeadingElement.webidl
dom/webidl/HTMLHtmlElement.webidl
dom/webidl/HTMLIFrameElement.webidl
dom/webidl/HTMLImageElement.webidl
dom/webidl/HTMLInputElement.webidl
dom/webidl/HTMLLIElement.webidl
dom/webidl/HTMLLabelElement.webidl
dom/webidl/HTMLLegendElement.webidl
dom/webidl/HTMLLinkElement.webidl
dom/webidl/HTMLMapElement.webidl
dom/webidl/HTMLMarqueeElement.webidl
dom/webidl/HTMLMediaElement.webidl
dom/webidl/HTMLMenuElement.webidl
dom/webidl/HTMLMenuItemElement.webidl
dom/webidl/HTMLMetaElement.webidl
dom/webidl/HTMLMeterElement.webidl
dom/webidl/HTMLModElement.webidl
dom/webidl/HTMLOListElement.webidl
dom/webidl/HTMLObjectElement.webidl
dom/webidl/HTMLOptGroupElement.webidl
dom/webidl/HTMLOptionElement.webidl
dom/webidl/HTMLOptionsCollection.webidl
dom/webidl/HTMLOutputElement.webidl
dom/webidl/HTMLParagraphElement.webidl
dom/webidl/HTMLParamElement.webidl
dom/webidl/HTMLPictureElement.webidl
dom/webidl/HTMLPreElement.webidl
dom/webidl/HTMLProgressElement.webidl
dom/webidl/HTMLQuoteElement.webidl
dom/webidl/HTMLScriptElement.webidl
dom/webidl/HTMLSelectElement.webidl
dom/webidl/HTMLSourceElement.webidl
dom/webidl/HTMLSpanElement.webidl
dom/webidl/HTMLStyleElement.webidl
dom/webidl/HTMLTableCaptionElement.webidl
dom/webidl/HTMLTableCellElement.webidl
dom/webidl/HTMLTableColElement.webidl
dom/webidl/HTMLTableElement.webidl
dom/webidl/HTMLTableRowElement.webidl
dom/webidl/HTMLTableSectionElement.webidl
dom/webidl/HTMLTemplateElement.webidl
dom/webidl/HTMLTextAreaElement.webidl
dom/webidl/HTMLTimeElement.webidl
dom/webidl/HTMLTitleElement.webidl
dom/webidl/HTMLTrackElement.webidl
dom/webidl/HTMLUListElement.webidl
dom/webidl/HTMLVideoElement.webidl
dom/webidl/HashChangeEvent.webidl
dom/webidl/HiddenPluginEvent.webidl
dom/webidl/History.webidl
dom/webidl/IDBFileHandle.webidl
dom/webidl/IIRFilterNode.webidl
dom/webidl/ImageCapture.webidl
dom/webidl/ImageCaptureErrorEvent.webidl
dom/webidl/ImageDocument.webidl
dom/webidl/InputEvent.webidl
dom/webidl/InstallTrigger.webidl
dom/webidl/IntersectionObserver.webidl
dom/webidl/IntlUtils.webidl
dom/webidl/KeyEvent.webidl
dom/webidl/KeyboardEvent.webidl
dom/webidl/KeyframeEffect.webidl
dom/webidl/Location.webidl
dom/webidl/MIDIAccess.webidl
dom/webidl/MIDIConnectionEvent.webidl
dom/webidl/MIDIInput.webidl
dom/webidl/MIDIInputMap.webidl
dom/webidl/MIDIMessageEvent.webidl
dom/webidl/MIDIOutput.webidl
dom/webidl/MIDIOutputMap.webidl
dom/webidl/MIDIPort.webidl
dom/webidl/MediaDeviceInfo.webidl
dom/webidl/MediaDevices.webidl
dom/webidl/MediaElementAudioSourceNode.webidl
dom/webidl/MediaEncryptedEvent.webidl
dom/webidl/MediaError.webidl
dom/webidl/MediaKeyError.webidl
dom/webidl/MediaKeyMessageEvent.webidl
dom/webidl/MediaKeySession.webidl
dom/webidl/MediaKeyStatusMap.webidl
dom/webidl/MediaKeySystemAccess.webidl
dom/webidl/MediaKeys.webidl
dom/webidl/MediaList.webidl
dom/webidl/MediaQueryList.webidl
dom/webidl/MediaQueryListEvent.webidl
dom/webidl/MediaRecorder.webidl
dom/webidl/MediaSource.webidl
dom/webidl/MediaStreamAudioDestinationNode.webidl
dom/webidl/MediaStreamAudioSourceNode.webidl
dom/webidl/MediaStreamError.webidl
dom/webidl/MediaStreamEvent.webidl
dom/webidl/MediaStreamTrackAudioSourceNode.webidl
dom/webidl/MimeType.webidl
dom/webidl/MimeTypeArray.webidl
dom/webidl/MouseEvent.webidl
dom/webidl/MouseScrollEvent.webidl
dom/webidl/MozApplicationEvent.webidl
dom/webidl/MutationEvent.webidl
dom/webidl/MutationObserver.webidl
dom/webidl/NamedNodeMap.webidl
dom/webidl/Navigator.webidl
dom/webidl/Node.webidl
dom/webidl/NodeFilter.webidl
dom/webidl/NodeIterator.webidl
dom/webidl/NodeList.webidl
dom/webidl/NotifyPaintEvent.webidl
dom/webidl/OfflineAudioCompletionEvent.webidl
dom/webidl/OfflineAudioContext.webidl
dom/webidl/OfflineResourceList.webidl
dom/webidl/OscillatorNode.webidl
dom/webidl/PageTransitionEvent.webidl
dom/webidl/PaintRequest.webidl
dom/webidl/PaintRequestList.webidl
dom/webidl/PannerNode.webidl
dom/webidl/ParentSHistory.webidl
dom/webidl/PaymentAddress.webidl
dom/webidl/PaymentRequest.webidl
dom/webidl/PaymentRequestUpdateEvent.webidl
dom/webidl/PaymentResponse.webidl
dom/webidl/PeerConnectionImpl.webidl
dom/webidl/PeerConnectionObserver.webidl
dom/webidl/PerformanceEntryEvent.webidl
dom/webidl/PerformanceNavigation.webidl
dom/webidl/PerformanceNavigationTiming.webidl
dom/webidl/PerformanceTiming.webidl
dom/webidl/PeriodicWave.webidl
dom/webidl/PermissionStatus.webidl
dom/webidl/Permissions.webidl
dom/webidl/Plugin.webidl
dom/webidl/PluginArray.webidl
dom/webidl/PluginCrashedEvent.webidl
dom/webidl/PointerEvent.webidl
dom/webidl/PopStateEvent.webidl
dom/webidl/PopupBlockedEvent.webidl
dom/webidl/Position.webidl
dom/webidl/PositionError.webidl
dom/webidl/Presentation.webidl
dom/webidl/PresentationAvailability.webidl
dom/webidl/PresentationConnection.webidl
dom/webidl/PresentationConnectionAvailableEvent.webidl
dom/webidl/PresentationConnectionCloseEvent.webidl
dom/webidl/PresentationConnectionList.webidl
dom/webidl/PresentationReceiver.webidl
dom/webidl/PresentationRequest.webidl
dom/webidl/ProcessingInstruction.webidl
dom/webidl/PushManager.webidl
dom/webidl/RTCCertificate.webidl
dom/webidl/RTCDTMFSender.webidl
dom/webidl/RTCDTMFToneChangeEvent.webidl
dom/webidl/RTCDataChannel.webidl
dom/webidl/RTCDataChannelEvent.webidl
dom/webidl/RTCIceCandidate.webidl
dom/webidl/RTCIdentityProvider.webidl
dom/webidl/RTCPeerConnection.webidl
dom/webidl/RTCPeerConnectionIceEvent.webidl
dom/webidl/RTCPeerConnectionStatic.webidl
dom/webidl/RTCRtpReceiver.webidl
dom/webidl/RTCRtpSender.webidl
dom/webidl/RTCRtpTransceiver.webidl
dom/webidl/RTCSessionDescription.webidl
dom/webidl/RTCStatsReport.webidl
dom/webidl/RTCTrackEvent.webidl
dom/webidl/RadioNodeList.webidl
dom/webidl/Range.webidl
dom/webidl/Reporting.webidl
dom/webidl/ResizeObserver.webidl
dom/webidl/SVGAElement.webidl
dom/webidl/SVGAngle.webidl
dom/webidl/SVGAnimateElement.webidl
dom/webidl/SVGAnimateMotionElement.webidl
dom/webidl/SVGAnimateTransformElement.webidl
dom/webidl/SVGAnimatedAngle.webidl
dom/webidl/SVGAnimatedBoolean.webidl
dom/webidl/SVGAnimatedEnumeration.webidl
dom/webidl/SVGAnimatedInteger.webidl
dom/webidl/SVGAnimatedLength.webidl
dom/webidl/SVGAnimatedLengthList.webidl
dom/webidl/SVGAnimatedNumber.webidl
dom/webidl/SVGAnimatedNumberList.webidl
dom/webidl/SVGAnimatedPreserveAspectRatio.webidl
dom/webidl/SVGAnimatedRect.webidl
dom/webidl/SVGAnimatedString.webidl
dom/webidl/SVGAnimatedTransformList.webidl
dom/webidl/SVGAnimationElement.webidl
dom/webidl/SVGCircleElement.webidl
dom/webidl/SVGClipPathElement.webidl
dom/webidl/SVGComponentTransferFunctionElement.webidl
dom/webidl/SVGDefsElement.webidl
dom/webidl/SVGDescElement.webidl
dom/webidl/SVGElement.webidl
dom/webidl/SVGEllipseElement.webidl
dom/webidl/SVGFEBlendElement.webidl
dom/webidl/SVGFEColorMatrixElement.webidl
dom/webidl/SVGFEComponentTransferElement.webidl
dom/webidl/SVGFECompositeElement.webidl
dom/webidl/SVGFEConvolveMatrixElement.webidl
dom/webidl/SVGFEDiffuseLightingElement.webidl
dom/webidl/SVGFEDisplacementMapElement.webidl
dom/webidl/SVGFEDistantLightElement.webidl
dom/webidl/SVGFEDropShadowElement.webidl
dom/webidl/SVGFEFloodElement.webidl
dom/webidl/SVGFEFuncAElement.webidl
dom/webidl/SVGFEFuncBElement.webidl
dom/webidl/SVGFEFuncGElement.webidl
dom/webidl/SVGFEFuncRElement.webidl
dom/webidl/SVGFEGaussianBlurElement.webidl
dom/webidl/SVGFEImageElement.webidl
dom/webidl/SVGFEMergeElement.webidl
dom/webidl/SVGFEMergeNodeElement.webidl
dom/webidl/SVGFEMorphologyElement.webidl
dom/webidl/SVGFEOffsetElement.webidl
dom/webidl/SVGFEPointLightElement.webidl
dom/webidl/SVGFESpecularLightingElement.webidl
dom/webidl/SVGFESpotLightElement.webidl
dom/webidl/SVGFETileElement.webidl
dom/webidl/SVGFETurbulenceElement.webidl
dom/webidl/SVGFilterElement.webidl
dom/webidl/SVGForeignObjectElement.webidl
dom/webidl/SVGGElement.webidl
dom/webidl/SVGGeometryElement.webidl
dom/webidl/SVGGradientElement.webidl
dom/webidl/SVGGraphicsElement.webidl
dom/webidl/SVGImageElement.webidl
dom/webidl/SVGLength.webidl
dom/webidl/SVGLengthList.webidl
dom/webidl/SVGLineElement.webidl
dom/webidl/SVGLinearGradientElement.webidl
dom/webidl/SVGMPathElement.webidl
dom/webidl/SVGMarkerElement.webidl
dom/webidl/SVGMaskElement.webidl
dom/webidl/SVGMatrix.webidl
dom/webidl/SVGMetadataElement.webidl
dom/webidl/SVGNumber.webidl
dom/webidl/SVGNumberList.webidl
dom/webidl/SVGPathElement.webidl
dom/webidl/SVGPathSeg.webidl
dom/webidl/SVGPathSegList.webidl
dom/webidl/SVGPatternElement.webidl
dom/webidl/SVGPoint.webidl
dom/webidl/SVGPointList.webidl
dom/webidl/SVGPolygonElement.webidl
dom/webidl/SVGPolylineElement.webidl
dom/webidl/SVGPreserveAspectRatio.webidl
dom/webidl/SVGRadialGradientElement.webidl
dom/webidl/SVGRect.webidl
dom/webidl/SVGRectElement.webidl
dom/webidl/SVGSVGElement.webidl
dom/webidl/SVGScriptElement.webidl
dom/webidl/SVGSetElement.webidl
dom/webidl/SVGStopElement.webidl
dom/webidl/SVGStringList.webidl
dom/webidl/SVGStyleElement.webidl
dom/webidl/SVGSwitchElement.webidl
dom/webidl/SVGSymbolElement.webidl
dom/webidl/SVGTSpanElement.webidl
dom/webidl/SVGTextContentElement.webidl
dom/webidl/SVGTextElement.webidl
dom/webidl/SVGTextPathElement.webidl
dom/webidl/SVGTextPositioningElement.webidl
dom/webidl/SVGTitleElement.webidl
dom/webidl/SVGTransform.webidl
dom/webidl/SVGTransformList.webidl
dom/webidl/SVGUnitTypes.webidl
dom/webidl/SVGUseElement.webidl
dom/webidl/SVGViewElement.webidl
dom/webidl/SVGZoomAndPan.webidl
dom/webidl/Screen.webidl
dom/webidl/ScreenOrientation.webidl
dom/webidl/ScriptProcessorNode.webidl
dom/webidl/ScrollAreaEvent.webidl
dom/webidl/ScrollViewChangeEvent.webidl
dom/webidl/SecurityPolicyViolationEvent.webidl
dom/webidl/Selection.webidl
dom/webidl/ShadowRoot.webidl
dom/webidl/SharedWorker.webidl
dom/webidl/SimpleGestureEvent.webidl
dom/webidl/SourceBuffer.webidl
dom/webidl/SourceBufferList.webidl
dom/webidl/SpeechGrammar.webidl
dom/webidl/SpeechGrammarList.webidl
dom/webidl/SpeechRecognition.webidl
dom/webidl/SpeechRecognitionAlternative.webidl
dom/webidl/SpeechRecognitionError.webidl
dom/webidl/SpeechRecognitionEvent.webidl
dom/webidl/SpeechRecognitionResult.webidl
dom/webidl/SpeechRecognitionResultList.webidl
dom/webidl/SpeechSynthesis.webidl
dom/webidl/SpeechSynthesisErrorEvent.webidl
dom/webidl/SpeechSynthesisEvent.webidl
dom/webidl/SpeechSynthesisUtterance.webidl
dom/webidl/SpeechSynthesisVoice.webidl
dom/webidl/StaticRange.webidl
dom/webidl/StereoPannerNode.webidl
dom/webidl/Storage.webidl
dom/webidl/StorageEvent.webidl
dom/webidl/StyleRuleChangeEvent.webidl
dom/webidl/StyleSheet.webidl
dom/webidl/StyleSheetApplicableStateChangeEvent.webidl
dom/webidl/StyleSheetChangeEvent.webidl
dom/webidl/StyleSheetList.webidl
dom/webidl/SubtleCrypto.webidl
dom/webidl/TCPSocket.webidl
dom/webidl/TestFunctions.webidl
dom/webidl/TestInterfaceJS.webidl
dom/webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl
dom/webidl/Text.webidl
dom/webidl/TextClause.webidl
dom/webidl/TextTrack.webidl
dom/webidl/TextTrackCue.webidl
dom/webidl/TextTrackCueList.webidl
dom/webidl/TextTrackList.webidl
dom/webidl/TimeEvent.webidl
dom/webidl/TimeRanges.webidl
dom/webidl/Touch.webidl
dom/webidl/TouchEvent.webidl
dom/webidl/TouchList.webidl
dom/webidl/TrackEvent.webidl
dom/webidl/TransceiverImpl.webidl
dom/webidl/TransitionEvent.webidl
dom/webidl/TreeColumn.webidl
dom/webidl/TreeColumns.webidl
dom/webidl/TreeContentView.webidl
dom/webidl/TreeWalker.webidl
dom/webidl/U2F.webidl
dom/webidl/UDPMessageEvent.webidl
dom/webidl/UDPSocket.webidl
dom/webidl/UIEvent.webidl
dom/webidl/UserProximityEvent.webidl
dom/webidl/VRDisplay.webidl
dom/webidl/VRDisplayEvent.webidl
dom/webidl/VRServiceTest.webidl
dom/webidl/VTTCue.webidl
dom/webidl/VTTRegion.webidl
dom/webidl/ValidityState.webidl
dom/webidl/VideoPlaybackQuality.webidl
dom/webidl/VideoTrack.webidl
dom/webidl/VideoTrackList.webidl
dom/webidl/VisualViewport.webidl
dom/webidl/WaveShaperNode.webidl
dom/webidl/WebAuthentication.webidl
dom/webidl/WebGL2RenderingContext.webidl
dom/webidl/WebGLRenderingContext.webidl
dom/webidl/WebGPU.webidl
dom/webidl/WebrtcDeprecated.webidl
dom/webidl/WebrtcGlobalInformation.webidl
dom/webidl/WheelEvent.webidl
dom/webidl/Window.webidl
dom/webidl/WindowRoot.webidl
dom/webidl/Worklet.webidl
dom/webidl/XMLDocument.webidl
dom/webidl/XMLSerializer.webidl
dom/webidl/XPathEvaluator.webidl
dom/webidl/XPathExpression.webidl
dom/webidl/XPathNSResolver.webidl
dom/webidl/XPathResult.webidl
dom/webidl/XSLTProcessor.webidl
dom/webidl/XULCommandEvent.webidl
dom/webidl/XULElement.webidl
dom/webidl/XULPopupElement.webidl
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -703,19 +703,18 @@ struct NamedConstructor {
  * defineOnGlobal controls whether properties should be defined on the given
  *                global for the interface object (if any) and named
  *                constructors (if any) for this interface.  This can be
  *                false in situations where we want the properties to only
  *                appear on privileged Xrays but not on the unprivileged
  *                underlying global.
  * unscopableNames if not null it points to a null-terminated list of const
  *                 char* names of the unscopable properties for this interface.
- * isGlobal if true, we're creating interface objects for a [Global] or
- *        [PrimaryGlobal] interface, and hence shouldn't define properties on
- *        the prototype object.
+ * isGlobal if true, we're creating interface objects for a [Global] interface,
+ *          and hence shouldn't define properties on the prototype object.
  * legacyWindowAliases if not null it points to a null-terminated list of const
  *                     char* names of the legacy window aliases for this
  *                     interface.
  *
  * At least one of protoClass, constructorClass or constructor should be
  * non-null. If constructorClass or constructor are non-null, the resulting
  * interface object will be defined on the given global with property name
  * |name|, which must also be non-null.
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -743,18 +743,17 @@ class Descriptor(DescriptorProvider):
     def needsXrayNamedDeleterHook(self):
         return self.operations["NamedDeleter"] is not None
 
     def isGlobal(self):
         """
         Returns true if this is the primary interface for a global object
         of some sort.
         """
-        return (self.interface.getExtendedAttribute("Global") or
-                self.interface.getExtendedAttribute("PrimaryGlobal"))
+        return self.interface.getExtendedAttribute("Global")
 
     @property
     def namedPropertiesEnumerable(self):
         """
         Returns whether this interface should have enumerable named properties
         """
         assert self.proxy
         assert self.supportsNamedProperties()
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -231,18 +231,16 @@ class IDLScope(IDLObject):
         else:
             self._name = None
 
         self._dict = {}
         self.globalNames = set()
         # A mapping from global name to the set of global interfaces
         # that have that global name.
         self.globalNameMapping = defaultdict(set)
-        self.primaryGlobalAttr = None
-        self.primaryGlobalName = None
 
     def __str__(self):
         return self.QName()
 
     def QName(self):
         # It's possible for us to be called before __init__ has been called, for
         # the IDLObjectWithScope case.  In that case, self._name won't be set yet.
         if hasattr(self, "_name"):
@@ -460,18 +458,27 @@ class IDLExposureMixins():
         self._globalScope = scope
 
         # Verify that our [Exposed] value, if any, makes sense.
         for globalName in self._exposureGlobalNames:
             if globalName not in scope.globalNames:
                 raise WebIDLError("Unknown [Exposed] value %s" % globalName,
                                   [self._location])
 
-        if len(self._exposureGlobalNames) == 0:
-            self._exposureGlobalNames.add(scope.primaryGlobalName)
+        # Verify that we are exposed _somwhere_ if we have some place to be
+        # exposed.  We don't want to assert that we're definitely exposed
+        # because a lot of our parser tests have small-enough IDL snippets that
+        # they don't include any globals, and we don't really want to go through
+        # and add global interfaces and [Exposed] annotations to all those
+        # tests.
+        if len(scope.globalNames) != 0:
+            if (len(self._exposureGlobalNames) == 0):
+                raise WebIDLError(("'%s' is not exposed anywhere even though we have "
+                                   "globals to be exposed to") % self,
+                                  [self.location])
 
         globalNameSetToExposureSet(scope, self._exposureGlobalNames,
                                    self.exposureSet)
 
     def isExposedInWindow(self):
         return 'Window' in self.exposureSet
 
     def isExposedOnMainThread(self):
@@ -793,18 +800,20 @@ class IDLInterfaceMixin(IDLInterfaceOrIn
     def finish(self, scope):
         if self._finished:
             return
         self._finished = True
 
         # Expose to the globals of interfaces that includes this mixin if this
         # mixin has no explicit [Exposed] so that its members can be exposed
         # based on the base interface exposure set.
-        # Make sure this is done before IDLExposureMixins.finish call to
-        # prevent exposing to PrimaryGlobal by default.
+        #
+        # Make sure this is done before IDLExposureMixins.finish call, since
+        # that converts our set of exposure global names to an actual exposure
+        # set.
         hasImplicitExposure = len(self._exposureGlobalNames) == 0
         if hasImplicitExposure:
             self._exposureGlobalNames.update(self.actualExposureGlobalNames)
 
         IDLInterfaceOrInterfaceMixinOrNamespace.finish(self, scope)
 
         self.finishMembers(scope)
 
@@ -992,20 +1001,18 @@ class IDLInterfaceOrNamespace(IDLInterfa
                     m.forceStatic()
 
         if self.parent:
             self.parent.finish(scope)
             self.parent._hasChildInterfaces = True
 
             self.totalMembersInSlots = self.parent.totalMembersInSlots
 
-            # Interfaces with [Global] or [PrimaryGlobal] must not
-            # have anything inherit from them
-            if (self.parent.getExtendedAttribute("Global") or
-                self.parent.getExtendedAttribute("PrimaryGlobal")):
+            # Interfaces with [Global] must not have anything inherit from them
+            if self.parent.getExtendedAttribute("Global"):
                 # Note: This is not a self.parent.isOnGlobalProtoChain() check
                 # because ancestors of a [Global] interface can have other
                 # descendants.
                 raise WebIDLError("[Global] interface has another interface "
                                   "inheriting from it",
                                   [self.location, self.parent.location])
 
             # Make sure that we're not exposed in places where our parent is not
@@ -1089,17 +1096,17 @@ class IDLInterfaceOrNamespace(IDLInterfa
                 # code with len(ctor._exposureGlobalNames) !=
                 # self._exposureGlobalNames.
                 ctor.finish(scope)
 
         for ctor in self.namedConstructors:
             if self.globalNames:
                 raise WebIDLError(
                     "Can't have both a named constructor and [Global]",
-                    [self.location, self.namedConstructors.location])
+                    [self.location, ctor.location])
             assert len(ctor._exposureGlobalNames) == 0
             ctor._exposureGlobalNames.update(self._exposureGlobalNames)
             ctor.finish(scope)
 
         # Make a copy of our member list, so things that implement us
         # can get those without all the stuff we implement ourselves
         # admixed.
         self.originalMembers = list(self.members)
@@ -1713,30 +1720,16 @@ class IDLInterface(IDLInterfaceOrNamespa
                     self.globalNames = [attr.value()]
                 elif attr.hasArgs():
                     self.globalNames = attr.args()
                 else:
                     self.globalNames = [self.identifier.name]
                 self.parentScope.addIfaceGlobalNames(self.identifier.name,
                                                      self.globalNames)
                 self._isOnGlobalProtoChain = True
-            elif identifier == "PrimaryGlobal":
-                if not attr.noArguments():
-                    raise WebIDLError("[PrimaryGlobal] must take no arguments",
-                                      [attr.location])
-                if self.parentScope.primaryGlobalAttr is not None:
-                    raise WebIDLError(
-                        "[PrimaryGlobal] specified twice",
-                        [attr.location,
-                         self.parentScope.primaryGlobalAttr.location])
-                self.parentScope.primaryGlobalAttr = attr
-                self.parentScope.primaryGlobalName = self.identifier.name
-                self.parentScope.addIfaceGlobalNames(self.identifier.name,
-                                                     [self.identifier.name])
-                self._isOnGlobalProtoChain = True
             elif identifier == "LegacyWindowAlias":
                 if attr.hasValue():
                     self.legacyWindowAliases = [attr.value()]
                 elif attr.hasArgs():
                     self.legacyWindowAliases = attr.args()
                 else:
                     raise WebIDLError("[%s] must either take an identifier "
                                       "or take an identifier list" % identifier,
@@ -3775,20 +3768,16 @@ class IDLInterfaceMember(IDLObjectWithId
 
     def handleExtendedAttribute(self, attr):
         pass
 
     def getExtendedAttribute(self, name):
         return self._extendedAttrDict.get(name, None)
 
     def finish(self, scope):
-        # We better be exposed _somewhere_.
-        if (len(self._exposureGlobalNames) == 0):
-            print(self.identifier.name)
-        assert len(self._exposureGlobalNames) != 0
         IDLExposureMixins.finish(self, scope)
 
     def validate(self):
         if self.isAttr() or self.isMethod():
             if self.affects == "Everything" and self.dependsOn != "Everything":
                 raise WebIDLError("Interface member is flagged as affecting "
                                   "everything but not depending on everything. "
                                   "That seems rather unlikely.",
@@ -5479,20 +5468,18 @@ class IDLIncludesStatement(IDLObject):
         if interface.isCallback():
             raise WebIDLError("Left-hand side of 'includes' is a callback "
                               "interface",
                               [self.interface.location, interface.location])
         if not isinstance(mixin, IDLInterfaceMixin):
             raise WebIDLError("Right-hand side of 'includes' is not an "
                               "interface mixin",
                               [self.mixin.location, mixin.location])
-        if len(interface._exposureGlobalNames) != 0:
-            mixin.actualExposureGlobalNames.update(interface._exposureGlobalNames)
-        else:
-            mixin.actualExposureGlobalNames.add(scope.primaryGlobalName);
+
+        mixin.actualExposureGlobalNames.update(interface._exposureGlobalNames)
 
         interface.addIncludedMixin(mixin)
         self.interface = interface
         self.mixin = mixin
 
     def validate(self):
         pass
 
@@ -7330,22 +7317,16 @@ class Parser(Tokenizer):
                                     # becomes a speedup again.
                                     # , picklefile='WebIDLGrammar.pkl'
             )
         finally:
             logger.reportGrammarErrors()
 
         self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None)
 
-        # To make our test harness work, pretend like we have a primary global already.
-        # Note that we _don't_ set _globalScope.primaryGlobalAttr,
-        # so we'll still be able to detect multiple PrimaryGlobal extended attributes.
-        self._globalScope.primaryGlobalName = "FakeTestPrimaryGlobal"
-        self._globalScope.addIfaceGlobalNames("FakeTestPrimaryGlobal", ["FakeTestPrimaryGlobal"])
-
         self._installBuiltins(self._globalScope)
         self._productions = []
 
         self._filename = "<builtin>"
         self.lexer.input(Parser._builtins)
         self._filename = None
 
         self.parser.parse(lexer=self.lexer, tracking=True)
--- a/dom/bindings/parser/tests/test_constructor_global.py
+++ b/dom/bindings/parser/tests/test_constructor_global.py
@@ -1,72 +1,76 @@
+import traceback
+
 def WebIDLTest(parser, harness):
     threw = False
     try:
         parser.parse("""
-            [Global]
+            [Global, Exposed=TestConstructorGlobal]
             interface TestConstructorGlobal {
               constructor();
             };
         """)
 
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw, "Should have thrown.")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [Global, NamedConstructor=FooBar]
+            [Global, Exposed=TestNamedConstructorGlobal,
+             NamedConstructor=FooBar]
             interface TestNamedConstructorGlobal {
             };
         """)
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw, "Should have thrown.")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [NamedConstructor=FooBar, Global]
+            [NamedConstructor=FooBar, Global,
+             Exposed=TestNamedConstructorGlobal]
             interface TestNamedConstructorGlobal {
             };
         """)
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw, "Should have thrown.")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [Global, HTMLConstructor]
+            [Global, HTMLConstructor, Exposed=TestHTMLConstructorGlobal]
             interface TestHTMLConstructorGlobal {
             };
         """)
 
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw, "Should have thrown.")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [HTMLConstructor, Global]
+            [HTMLConstructor, Global, Exposed=TestHTMLConstructorGlobal]
             interface TestHTMLConstructorGlobal {
             };
         """)
 
         results = parser.finish()
     except:
         threw = True
 
--- a/dom/bindings/parser/tests/test_exposed_extended_attribute.py
+++ b/dom/bindings/parser/tests/test_exposed_extended_attribute.py
@@ -1,15 +1,15 @@
 import WebIDL
 
 def WebIDLTest(parser, harness):
     parser.parse("""
-      [PrimaryGlobal] interface Foo {};
-      [Global=(Bar1,Bar2)] interface Bar {};
-      [Global=Baz2] interface Baz {};
+      [Global, Exposed=Foo] interface Foo {};
+      [Global=(Bar, Bar1,Bar2), Exposed=Bar] interface Bar {};
+      [Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
 
       [Exposed=(Foo,Bar1)]
       interface Iface {
         void method1();
 
         [Exposed=Bar1]
         readonly attribute any attr;
       };
@@ -46,20 +46,21 @@ def WebIDLTest(parser, harness):
 
     harness.ok(iface.exposureSet == set(["Foo", "Bar"]),
                "Iface should have the right exposure set")
     harness.ok(iface._exposureGlobalNames == set(["Foo", "Bar1"]),
                "Iface should have the right exposure global names")
 
     parser = parser.reset()
     parser.parse("""
-      [PrimaryGlobal] interface Foo {};
-      [Global=(Bar1,Bar2)] interface Bar {};
-      [Global=Baz2] interface Baz {};
+      [Global, Exposed=Foo] interface Foo {};
+      [Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {};
+      [Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
 
+      [Exposed=Foo]
       interface Iface2 {
         void method3();
       };
     """)
     results = parser.finish()
 
     harness.check(len(results), 4, "Should know about four things");
     iface = results[3]
@@ -75,19 +76,19 @@ def WebIDLTest(parser, harness):
 
     harness.ok(iface.exposureSet == set(["Foo"]),
                "Iface2 should have the right exposure set")
     harness.ok(iface._exposureGlobalNames == set(["Foo"]),
                "Iface2 should have the right exposure global names")
 
     parser = parser.reset()
     parser.parse("""
-      [PrimaryGlobal] interface Foo {};
-      [Global=(Bar1,Bar2)] interface Bar {};
-      [Global=Baz2] interface Baz {};
+      [Global, Exposed=Foo] interface Foo {};
+      [Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {};
+      [Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
 
       [Exposed=Foo]
       interface Iface3 {
         void method4();
       };
 
       [Exposed=(Foo,Bar1)]
       interface mixin Mixin {
@@ -176,36 +177,36 @@ def WebIDLTest(parser, harness):
         threw = True
 
     harness.ok(threw, "Should have thrown on invalid Exposed value on constant.")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [Global] interface Foo {};
-            [Global] interface Bar {};
+            [Global, Exposed=Foo] interface Foo {};
+            [Global, Exposed=Bar] interface Bar {};
 
             [Exposed=Foo]
             interface Baz {
               [Exposed=Bar]
               void method();
             };
         """)
 
         results = parser.finish()
     except Exception as x:
         threw = True
 
     harness.ok(threw, "Should have thrown on member exposed where its interface is not.")
 
     parser = parser.reset()
     parser.parse("""
-        [Global] interface Foo {};
-        [Global] interface Bar {};
+        [Global, Exposed=Foo] interface Foo {};
+        [Global, Exposed=Bar] interface Bar {};
 
         [Exposed=Foo]
         interface Baz {
           void method();
         };
 
         [Exposed=Bar]
         interface mixin Mixin {
--- a/dom/bindings/parser/tests/test_global_extended_attr.py
+++ b/dom/bindings/parser/tests/test_global_extended_attr.py
@@ -1,29 +1,30 @@
 def WebIDLTest(parser, harness):
     parser.parse("""
-      [Global]
+      [Global, Exposed=Foo]
       interface Foo : Bar {
         getter any(DOMString name);
       };
+      [Exposed=Foo]
       interface Bar {};
     """)
 
     results = parser.finish()
 
     harness.ok(results[0].isOnGlobalProtoChain(),
                "[Global] interface should be on global's proto chain")
     harness.ok(results[1].isOnGlobalProtoChain(),
                "[Global] interface should be on global's proto chain")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-          [Global]
+          [Global, Exposed=Foo]
           interface Foo {
             getter any(DOMString name);
             setter void(DOMString name, any arg);
           };
         """)
         results = parser.finish()
     except:
         threw = True
@@ -31,17 +32,17 @@ def WebIDLTest(parser, harness):
     harness.ok(threw,
                "Should have thrown for [Global] used on an interface with a "
                "named setter")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-          [Global]
+          [Global, Exposed=Foo]
           interface Foo {
             getter any(DOMString name);
             deleter void(DOMString name);
           };
         """)
         results = parser.finish()
     except:
         threw = True
@@ -49,54 +50,55 @@ def WebIDLTest(parser, harness):
     harness.ok(threw,
                "Should have thrown for [Global] used on an interface with a "
                "named deleter")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-          [Global, OverrideBuiltins]
+          [Global, OverrideBuiltins, Exposed=Foo]
           interface Foo {
           };
         """)
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw,
                "Should have thrown for [Global] used on an interface with a "
                "[OverrideBuiltins]")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-          [Global]
+          [Global, Exposed=Foo]
           interface Foo : Bar {
           };
-          [OverrideBuiltins]
+          [OverrideBuiltins, Exposed=Foo]
           interface Bar {
           };
         """)
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw,
                "Should have thrown for [Global] used on an interface with an "
                "[OverrideBuiltins] ancestor")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-          [Global]
+          [Global, Exposed=Foo]
           interface Foo {
           };
+          [Exposed=Foo]
           interface Bar : Foo {
           };
         """)
         results = parser.finish()
     except:
         threw = True
 
     harness.ok(threw,
--- a/dom/bindings/parser/tests/test_interface.py
+++ b/dom/bindings/parser/tests/test_interface.py
@@ -278,17 +278,17 @@ def WebIDLTest(parser, harness):
         results = parser.finish()
     except:
         threw = True
     harness.ok(threw,
                "Should not allow unknown extended attributes on interfaces")
 
     parser = parser.reset()
     parser.parse("""
-        [Global] interface Window {};
+        [Global, Exposed=Window] interface Window {};
         [Exposed=Window, LegacyWindowAlias=A]
         interface B {};
         [Exposed=Window, LegacyWindowAlias=(C, D)]
         interface E {};
     """);
     results = parser.finish();
     harness.check(results[1].legacyWindowAliases, ["A"],
                   "Should support a single identifier")
@@ -320,47 +320,49 @@ def WebIDLTest(parser, harness):
         threw = True
     harness.ok(threw,
                "Should not allow [LegacyWindowAlias] without Window exposure")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [Global] interface Window {};
+            [Global, Exposed=Window] interface Window {};
+            [Exposed=Window]
             interface A {};
             [Exposed=Window, LegacyWindowAlias=A]
             interface B {};
         """)
         results = parser.finish()
     except:
         threw = True
     harness.ok(threw,
                "Should not allow [LegacyWindowAlias] to conflict with other identifiers")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [Global] interface Window {};
+            [Global, Exposed=Window] interface Window {};
             [Exposed=Window, LegacyWindowAlias=A]
             interface B {};
+            [Exposed=Window]
             interface A {};
         """)
         results = parser.finish()
     except:
         threw = True
     harness.ok(threw,
                "Should not allow [LegacyWindowAlias] to conflict with other identifiers")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            [Global] interface Window {};
+            [Global, Exposed=Window] interface Window {};
             [Exposed=Window, LegacyWindowAlias=A]
             interface B {};
             [Exposed=Window, LegacyWindowAlias=A]
             interface C {};
         """)
         results = parser.finish()
     except:
         threw = True
--- a/dom/bindings/parser/tests/test_interfacemixin.py
+++ b/dom/bindings/parser/tests/test_interfacemixin.py
@@ -372,53 +372,53 @@ def WebIDLTest(parser, harness):
         results = parser.finish()
     except:
         threw = True
     harness.ok(threw,
                "Should fail if the included mixin interfaces have duplicated member")
 
     parser = parser.reset()
     parser.parse("""
-        [Global] interface Window {};
-        [Global] interface Worker {};
+        [Global, Exposed=Window] interface Window {};
+        [Global, Exposed=Worker] interface Worker {};
         [Exposed=Window]
         interface Base {};
         interface mixin Mixin {
             Base returnSelf();
         };
         Base includes Mixin;
     """)
     results = parser.finish()
     base = results[2]
     attr = base.members[0]
     harness.check(attr.exposureSet, set(["Window"]),
                   "Should expose on globals where the base interfaces are exposed")
 
     parser = parser.reset()
     parser.parse("""
-        [Global] interface Window {};
-        [Global] interface Worker {};
+        [Global, Exposed=Window] interface Window {};
+        [Global, Exposed=Worker] interface Worker {};
         [Exposed=Window]
         interface Base {};
         [Exposed=Window]
         interface mixin Mixin {
             attribute short a;
         };
         Base includes Mixin;
     """)
     results = parser.finish()
     base = results[2]
     attr = base.members[0]
     harness.check(attr.exposureSet, set(["Window"]),
                  "Should follow [Exposed] on interface mixin")
 
     parser = parser.reset()
     parser.parse("""
-        [Global] interface Window {};
-        [Global] interface Worker {};
+        [Global, Exposed=Window] interface Window {};
+        [Global, Exposed=Worker] interface Worker {};
         [Exposed=Window]
         interface Base1 {};
         [Exposed=Worker]
         interface Base2 {};
         interface mixin Mixin {
             attribute short a;
         };
         Base1 includes Mixin;
@@ -430,33 +430,8 @@ def WebIDLTest(parser, harness):
     harness.check(attr.exposureSet, set(["Window", "Worker"]),
                  "Should expose on all globals where including interfaces are "
                   "exposed")
     base = results[3]
     attr = base.members[0]
     harness.check(attr.exposureSet, set(["Window", "Worker"]),
                  "Should expose on all globals where including interfaces are "
                   "exposed")
-
-    parser = parser.reset()
-    parser.parse("""
-        [PrimaryGlobal] interface Window {};
-        [Global] interface Worker {};
-        interface Base1 {};
-        [Exposed=Worker]
-        interface Base2 {};
-        interface mixin Mixin {
-            attribute short a;
-        };
-        Base1 includes Mixin;
-        Base2 includes Mixin;
-    """)
-    results = parser.finish()
-    base = results[2]
-    attr = base.members[0]
-    harness.check(attr.exposureSet, set(["Window", "Worker"]),
-                 "Should expose on all globals where including interfaces are "
-                  "exposed")
-    base = results[3]
-    attr = base.members[0]
-    harness.check(attr.exposureSet, set(["Window", "Worker"]),
-                 "Should expose on all globals where including interfaces are "
-                  "exposed")
--- a/dom/bindings/test/TestCodeGen.webidl
+++ b/dom/bindings/test/TestCodeGen.webidl
@@ -7,20 +7,22 @@
 typedef long myLong;
 typedef TestInterface AnotherNameForTestInterface;
 typedef TestInterface? NullableTestInterface;
 typedef CustomEventInit TestDictionaryTypedef;
 
 interface TestExternalInterface;
 
 // We need a pref name that's in StaticPrefList.h here.
-[Pref="dom.webidl.test1"]
+[Pref="dom.webidl.test1",
+ Exposed=Window]
 interface TestRenamedInterface {
 };
 
+[Exposed=Window]
 callback interface TestCallbackInterface {
   readonly attribute long foo;
   attribute DOMString bar;
   void doSomething();
   long doSomethingElse(DOMString arg, TestInterface otherArg);
   void doSequenceLongArg(sequence<long> arg);
   void doSequenceStringArg(sequence<DOMString> arg);
   void doRecordLongArg(record<DOMString, long> arg);
@@ -54,16 +56,17 @@ callback interface TestCallbackInterface
   void passSequenceOfNullableArrayBuffers(sequence<ArrayBuffer?> arg);
   void passVariadicTypedArray(Float32Array... arg);
   void passVariadicNullableTypedArray(Float32Array?... arg);
   Uint8Array receiveUint8Array();
   attribute Uint8Array uint8ArrayAttr;
   Promise<void> receivePromise();
 };
 
+[Exposed=Window]
 callback interface TestSingleOperationCallbackInterface {
   TestInterface doSomething(short arg, sequence<double> anotherArg);
 };
 
 enum TestEnum {
   "1",
   "a",
   "b",
@@ -137,28 +140,30 @@ callback constructor TestObjectConstruct
 callback constructor TestTypedArrayConstruction = ArrayBuffer();
 callback constructor TestSequenceConstruction = sequence<boolean>();
 // If you add a new test callback, add it to the forceCallbackGeneration
 // method on TestInterface so it actually gets tested.
 
 TestInterface includes InterfaceMixin;
 
 // This interface is only for use in the constructor below
+[Exposed=Window]
 interface OnlyForUseInConstructor {
 };
 
 [NamedConstructor=Test,
  NamedConstructor=Test(DOMString str),
  NamedConstructor=Test2(DictForConstructor dict, any any1, object obj1,
                         object? obj2, sequence<Dict> seq, optional any any2,
                         optional object obj3, optional object? obj4),
  NamedConstructor=Test3((long or record<DOMString, any>) arg1),
  NamedConstructor=Test4(record<DOMString, record<DOMString, any>> arg1),
  NamedConstructor=Test5(record<DOMString, sequence<record<DOMString, record<DOMString, sequence<sequence<any>>>>>> arg1),
  NamedConstructor=Test6(sequence<record<ByteString, sequence<sequence<record<ByteString, record<USVString, any>>>>>> arg1),
+ Exposed=Window,
  ]
 interface TestInterface {
   constructor();
   constructor(DOMString str);
   constructor(unsigned long num, boolean? boolArg);
   constructor(TestInterface? iface);
   constructor(unsigned long arg1, TestInterface iface);
   constructor(Date arg1);
@@ -1014,22 +1019,25 @@ interface TestInterface {
 
   // [NeedsWindowsUndef] test generation
   [NeedsWindowsUndef]
   const unsigned long NO_ERROR = 0xffffffff;
 
   // If you add things here, add them to TestExampleGen and TestJSImplGen as well
 };
 
+[Exposed=Window]
 interface TestParentInterface {
 };
 
+[Exposed=Window]
 interface TestChildInterface : TestParentInterface {
 };
 
+[Exposed=Window]
 interface TestNonWrapperCacheInterface {
 };
 
 interface mixin InterfaceMixin {
   void mixedInMethod();
   attribute boolean mixedInProperty;
 
   const long mixedInConstant = 5;
@@ -1184,133 +1192,152 @@ dictionary DictWithConditionalMembers {
   long chromeOnlyFuncControlledMember;
   // We need a pref name that's in StaticPrefList.h here.
   [Pref="dom.webidl.test1"]
   long prefControlledMember;
   [Pref="dom.webidl.test1", ChromeOnly, Func="TestFuncControlledMember"]
   long chromeOnlyFuncAndPrefControlledMember;
 };
 
+[Exposed=Window]
 interface TestIndexedGetterInterface {
   getter long item(unsigned long idx);
   readonly attribute unsigned long length;
   legacycaller void();
   [Cached, Pure] readonly attribute long cachedAttr;
   [StoreInSlot, Pure] readonly attribute long storeInSlotAttr;
 };
 
+[Exposed=Window]
 interface TestNamedGetterInterface {
   getter DOMString (DOMString name);
 };
 
+[Exposed=Window]
 interface TestIndexedGetterAndSetterAndNamedGetterInterface {
   getter DOMString (DOMString myName);
   getter long (unsigned long index);
   setter void (unsigned long index, long arg);
   readonly attribute unsigned long length;
 };
 
+[Exposed=Window]
 interface TestIndexedAndNamedGetterInterface {
   getter long (unsigned long index);
   getter DOMString namedItem(DOMString name);
   readonly attribute unsigned long length;
 };
 
+[Exposed=Window]
 interface TestIndexedSetterInterface {
   setter void setItem(unsigned long idx, DOMString item);
   getter DOMString (unsigned long idx);
   readonly attribute unsigned long length;
 };
 
+[Exposed=Window]
 interface TestNamedSetterInterface {
   setter void (DOMString myName, TestIndexedSetterInterface item);
   getter TestIndexedSetterInterface (DOMString name);
 };
 
+[Exposed=Window]
 interface TestIndexedAndNamedSetterInterface {
   setter void (unsigned long index, TestIndexedSetterInterface item);
   getter TestIndexedSetterInterface (unsigned long index);
   readonly attribute unsigned long length;
   setter void setNamedItem(DOMString name, TestIndexedSetterInterface item);
   getter TestIndexedSetterInterface (DOMString name);
 };
 
+[Exposed=Window]
 interface TestIndexedAndNamedGetterAndSetterInterface : TestIndexedSetterInterface {
   getter long item(unsigned long index);
   getter DOMString namedItem(DOMString name);
   setter void (unsigned long index, long item);
   setter void (DOMString name, DOMString item);
   stringifier DOMString ();
   readonly attribute unsigned long length;
 };
 
+[Exposed=Window]
 interface TestNamedDeleterInterface {
   deleter void (DOMString name);
   getter long (DOMString name);
 };
 
+[Exposed=Window]
 interface TestNamedDeleterWithRetvalInterface {
   deleter boolean delNamedItem(DOMString name);
   getter long (DOMString name);
 };
 
+[Exposed=Window]
 interface TestCppKeywordNamedMethodsInterface {
   boolean continue();
   boolean delete();
   long volatile();
 };
 
-[Deprecated="EnablePrivilege"]
+[Deprecated="EnablePrivilege",
+ Exposed=Window]
 interface TestDeprecatedInterface {
   constructor();
 
   static void alsoDeprecated();
 };
 
 
+[Exposed=Window]
 interface TestInterfaceWithPromiseConstructorArg {
   constructor(Promise<void> promise);
 };
 
+[Exposed=Window]
 namespace TestNamespace {
   readonly attribute boolean foo;
   long bar();
 };
 
 partial namespace TestNamespace {
   void baz();
 };
 
-[ClassString="RenamedNamespaceClassName"]
+[ClassString="RenamedNamespaceClassName",
+ Exposed=Window]
 namespace TestRenamedNamespace {
 };
 
-[ProtoObjectHack]
+[ProtoObjectHack,
+ Exposed=Window]
 namespace TestProtoObjectHackedNamespace {
 };
 
-[SecureContext]
+[SecureContext,
+ Exposed=Window]
 interface TestSecureContextInterface {
   static void alsoSecureContext();
 };
 
 [Exposed=(Window,Worker)]
 interface TestWorkerExposedInterface {
   [NeedsSubjectPrincipal] void needsSubjectPrincipalMethod();
   [NeedsSubjectPrincipal] attribute boolean needsSubjectPrincipalAttr;
   [NeedsCallerType] void needsCallerTypeMethod();
   [NeedsCallerType] attribute boolean needsCallerTypeAttr;
   [NeedsSubjectPrincipal=NonSystem] void needsNonSystemSubjectPrincipalMethod();
   [NeedsSubjectPrincipal=NonSystem] attribute boolean needsNonSystemSubjectPrincipalAttr;
 };
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface TestHTMLConstructorInterface {
 };
 
+[Exposed=Window]
 interface TestThrowingConstructorInterface {
   [Throws]
   constructor();
   [Throws]
   constructor(DOMString str);
   [Throws]
   constructor(unsigned long num, boolean? boolArg);
   [Throws]
@@ -1321,16 +1348,17 @@ interface TestThrowingConstructorInterfa
   constructor(Date arg1);
   [Throws]
   constructor(ArrayBuffer arrayBuf);
   [Throws]
   constructor(Uint8Array typedArr);
   // [Throws] constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3);
 };
 
+[Exposed=Window]
 interface TestCEReactionsInterface {
   [CEReactions] setter void (unsigned long index, long item);
   [CEReactions] setter void (DOMString name, DOMString item);
   [CEReactions] deleter void (DOMString name);
   getter long item(unsigned long index);
   getter DOMString (DOMString name);
   readonly attribute unsigned long length;
 };
@@ -1344,16 +1372,17 @@ dictionary TestAttributesOnDictionaryMem
   [Clamp] octet a;
   [ChromeOnly, Clamp] octet b;
   required [Clamp] octet c;
   [ChromeOnly] octet d;
   // ChromeOnly doesn't mix with required, so we can't
   // test [ChromeOnly] required [Clamp] octet e
 };
 
+[Exposed=Window]
 interface TestAttributesOnTypes {
   void foo(OctetClamp thingy);
   void bar(OctetRange thingy);
   void baz(NullEmptyString thingy);
   // void qux(NullEmptyJSString thingy);
   attribute [Clamp] octet someAttr;
   void argWithAttr([Clamp] octet arg0, optional [Clamp] octet arg1);
   // There aren't any argument-only attributes that we can test here,
--- a/dom/bindings/test/TestExampleGen.webidl
+++ b/dom/bindings/test/TestExampleGen.webidl
@@ -3,17 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 [NamedConstructor=Example,
  NamedConstructor=Example(DOMString str),
  NamedConstructor=Example2(DictForConstructor dict, any any1, object obj1,
                            object? obj2, sequence<Dict> seq, optional any any2,
                            optional object obj3, optional object? obj4),
- NamedConstructor=Example2((long or record<DOMString, any>) arg1)
+ NamedConstructor=Example2((long or record<DOMString, any>) arg1),
+ Exposed=Window,
  ]
 interface TestExampleInterface {
   constructor();
   constructor(DOMString str);
   constructor(unsigned long num, boolean? boolArg);
   constructor(TestInterface? iface);
   constructor(unsigned long arg1, TestInterface iface);
   constructor(Date arg1);
@@ -815,16 +816,17 @@ interface TestExampleInterface {
 
   // [NeedsWindowsUndef] test generation
   [NeedsWindowsUndef]
   const unsigned long NO_ERROR = 0xffffffff;
 
   // If you add things here, add them to TestCodeGen and TestJSImplGen as well
 };
 
+[Exposed=Window]
 interface TestExampleProxyInterface {
   getter long longIndexedGetter(unsigned long ix);
   setter void longIndexedSetter(unsigned long y, long z);
   readonly attribute unsigned long length;
   stringifier DOMString myStringifier();
   getter short shortNameGetter(DOMString nom);
   deleter void (DOMString nomnom);
   setter void shortNamedSetter(DOMString me, short value);
@@ -835,16 +837,17 @@ interface TestExampleWorkerInterface {
   [NeedsSubjectPrincipal] void needsSubjectPrincipalMethod();
   [NeedsSubjectPrincipal] attribute boolean needsSubjectPrincipalAttr;
   [NeedsCallerType] void needsCallerTypeMethod();
   [NeedsCallerType] attribute boolean needsCallerTypeAttr;
   [NeedsSubjectPrincipal=NonSystem] void needsNonSystemSubjectPrincipalMethod();
   [NeedsSubjectPrincipal=NonSystem] attribute boolean needsNonSystemSubjectPrincipalAttr;
 };
 
+[Exposed=Window]
 interface TestExampleThrowingConstructorInterface {
   [Throws]
   constructor();
   [Throws]
   constructor(DOMString str);
   [Throws]
   constructor(unsigned long num, boolean? boolArg);
   [Throws]
--- a/dom/bindings/test/TestJSImplGen.webidl
+++ b/dom/bindings/test/TestJSImplGen.webidl
@@ -10,17 +10,17 @@ typedef TestJSImplInterface? NullableTes
 
 callback MyTestCallback = void();
 
 enum MyTestEnum {
   "a",
   "b"
 };
 
-[JSImplementation="@mozilla.org/test-js-impl-interface;1"]
+[Exposed=Window, JSImplementation="@mozilla.org/test-js-impl-interface;1"]
 interface TestJSImplInterface {
   // We don't support multiple constructors (bug 869268) or named constructors
   // for JS-implemented WebIDL.
   [Throws]
   constructor(DOMString str, unsigned long num, boolean? boolArg,
               TestInterface? iface, long arg1,
               DictForConstructor dict, any any1,
               object obj1,
@@ -837,21 +837,24 @@ interface TestJSImplInterface {
 
   // [NeedsWindowsUndef] test generation
   [NeedsWindowsUndef]
   const unsigned long NO_ERROR = 0xffffffff;
 
   // If you add things here, add them to TestCodeGen as well
 };
 
+[Exposed=Window]
 interface TestCImplementedInterface : TestJSImplInterface {
 };
 
+[Exposed=Window]
 interface TestCImplementedInterface2 {
 };
 
 [NoInterfaceObject,
- JSImplementation="@mozilla.org/test-js-impl-interface;2"]
+ JSImplementation="@mozilla.org/test-js-impl-interface;2",
+ Exposed=Window]
 interface TestJSImplNoInterfaceObject {
   // [Cached] is not supported in JS-implemented WebIDL.
   //[Cached, Pure]
   //readonly attribute byte cachedByte;
 };
--- a/dom/bindings/test/TestJSImplInheritanceGen.webidl
+++ b/dom/bindings/test/TestJSImplInheritanceGen.webidl
@@ -1,39 +1,39 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[JSImplementation="@mozilla.org/test-js-impl-interface2;1"]
+[Exposed=Window, JSImplementation="@mozilla.org/test-js-impl-interface2;1"]
 interface TestJSImplInterface2 :  TestCImplementedInterface {
   [Throws]
   constructor();
 };
 
-[JSImplementation="@mozilla.org/test-js-impl-interface3;1"]
+[Exposed=Window, JSImplementation="@mozilla.org/test-js-impl-interface3;1"]
 interface TestJSImplInterface3 : TestCImplementedInterface2 {
   [Throws]
   constructor();
 };
 
 // Important: TestJSImplInterface5 needs to come before TestJSImplInterface6 in
 // this file to test what it's trying to test.
-[JSImplementation="@mozilla.org/test-js-impl-interface5;1"]
+[Exposed=Window, JSImplementation="@mozilla.org/test-js-impl-interface5;1"]
 interface TestJSImplInterface5 : TestJSImplInterface6 {
   [Throws]
   constructor();
 };
 
 // Important: TestJSImplInterface6 needs to come after TestJSImplInterface3 in
 // this file to test what it's trying to test.
-[JSImplementation="@mozilla.org/test-js-impl-interface6;1"]
+[Exposed=Window, JSImplementation="@mozilla.org/test-js-impl-interface6;1"]
 interface TestJSImplInterface6 : TestJSImplInterface3 {
   [Throws]
   constructor();
 };
 
-[JSImplementation="@mozilla.org/test-js-impl-interface4;1"]
+[Exposed=Window, JSImplementation="@mozilla.org/test-js-impl-interface4;1"]
 interface TestJSImplInterface4 : EventTarget {
   [Throws]
   constructor();
 };
--- a/dom/chrome-webidl/DOMLocalization.webidl
+++ b/dom/chrome-webidl/DOMLocalization.webidl
@@ -19,17 +19,17 @@
  *    - setAttributes      - set l10n attributes of an element
  *    - getAttributes      - retrieve l10n attributes of an element
  *    - translateFragment  - translate a DOM fragment
  *    - translateElements  - translate a list of DOM elements
  *    - translateRoots     - translate all attached roots
  *
  */
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface DOMLocalization : Localization {
   /**
    * Constructor arguments:
    *    - aResourceids       - a list of localization resource URIs
    *                           which will provide messages for this
    *                           Localization instance.
    *    - aGenerateMessages  - a callback function which will be
    *                           used to generate an iterator
--- a/dom/chrome-webidl/DebuggerNotification.webidl
+++ b/dom/chrome-webidl/DebuggerNotification.webidl
@@ -15,43 +15,43 @@ enum DebuggerNotificationType {
   "setTimeoutCallback",
   "setIntervalCallback",
   "requestAnimationFrameCallback",
 
   // EventCallbackDebuggerNotification
   "domEvent",
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface DebuggerNotification {
   readonly attribute DebuggerNotificationType type;
 
   // The global object that has triggered the notification.
   readonly attribute object global;
 };
 
 // For DOM events, we send notifications just before, and just after the
 // event handler has been dispatched so that listeners
 enum CallbackDebuggerNotificationPhase {
   "pre",
   "post",
 };
 
 // A base notification type for notifications that are dispatched as pairs with
 // a before and after notification.
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface CallbackDebuggerNotification : DebuggerNotification {
   readonly attribute CallbackDebuggerNotificationPhase phase;
 };
 
 enum EventCallbackDebuggerNotificationType {
   "global",
   "node",
   "xhr",
   "worker",
 };
 
 // A notification that about the engine calling a DOM event handler.
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface EventCallbackDebuggerNotification : CallbackDebuggerNotification {
   readonly attribute Event event;
   readonly attribute EventCallbackDebuggerNotificationType targetType;
 };
--- a/dom/chrome-webidl/DocumentL10n.webidl
+++ b/dom/chrome-webidl/DocumentL10n.webidl
@@ -11,16 +11,17 @@
  * allows for localization-specific DOM operations on a defined
  * localization context, and retrival of formatted localization
  * messages out of that context.
  *
  * The context is created when `<link rel="localization"/>` elements
  * are added to the document, and is removed in case all links
  * of that type are removed from it.
  */
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface DocumentL10n : DOMLocalization {
   /**
    * A promise which gets resolved when the initial DOM localization resources
    * fetching is complete and the initial translation of the DOM is finished.
    */
   readonly attribute Promise<any> ready;
 };
--- a/dom/chrome-webidl/Flex.webidl
+++ b/dom/chrome-webidl/Flex.webidl
@@ -15,17 +15,17 @@
  */
 enum FlexPhysicalDirection {
   "horizontal-lr",
   "horizontal-rl",
   "vertical-tb",
   "vertical-bt",
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface Flex
 {
   sequence<FlexLineValues> getLines();
 
   /**
    * The physical direction in which successive flex items are placed,
    * within a flex line in this flex container.
    */
@@ -46,17 +46,17 @@ interface Flex
  * are *actually* growing (or shrinking).  This simply indicates what
  * the layout algorithm "wants" to do, based on the free space -- 
  * and items will stretch from their flex base size in the corresponding
  * direction, if permitted by their min/max constraints and their
  * corresponding flex factor.
  */
 enum FlexLineGrowthState { "shrinking", "growing" };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface FlexLineValues
 {
   readonly attribute FlexLineGrowthState growthState;
   readonly attribute double crossStart;
   readonly attribute double crossSize;
 
   // firstBaselineOffset measures from flex-start edge.
   readonly attribute double firstBaselineOffset;
@@ -74,17 +74,17 @@ interface FlexLineValues
 /**
  * Item main sizes have either been unclamped, clamped to the minimum,
  * or clamped to the maximum.
  */
 enum FlexItemClampState {
   "unclamped", "clamped_to_min", "clamped_to_max"
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface FlexItemValues
 {
   readonly attribute Node? node;
   readonly attribute DOMRectReadOnly frameRect;
   readonly attribute double mainBaseSize;
   readonly attribute double mainDeltaSize;
   readonly attribute double mainMinSize;
   readonly attribute double mainMaxSize;
--- a/dom/chrome-webidl/InspectorUtils.webidl
+++ b/dom/chrome-webidl/InspectorUtils.webidl
@@ -4,17 +4,18 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 /**
  * A collection of utility methods for use by devtools.
  *
  * See InspectorUtils.h for documentation on these methods.
  */
-[Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled"]
+[Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled",
+ Exposed=Window]
 namespace InspectorUtils {
   // documentOnly tells whether user and UA sheets should get included.
   sequence<StyleSheet> getAllStyleSheets(Document document, optional boolean documentOnly = false);
   sequence<CSSStyleRule> getCSSStyleRules(
     Element element,
     optional [TreatNullAs=EmptyString] DOMString pseudo = "",
     optional boolean relevantLinkVisited = false);
   unsigned long getRuleLine(CSSRule rule);
@@ -131,17 +132,18 @@ dictionary InspectorVariationInstance {
 };
 
 dictionary InspectorFontFeature {
   required DOMString tag;
   required DOMString script;
   required DOMString languageSystem;
 };
 
-[Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled"]
+[Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled",
+ Exposed=Window]
 interface InspectorFontFace {
   // An indication of how we found this font during font-matching.
   // Note that the same physical font may have been found in multiple ways within a range.
   readonly attribute boolean fromFontGroup;
   readonly attribute boolean fromLanguagePrefs;
   readonly attribute boolean fromSystemFallback;
 
   // available for all fonts
--- a/dom/chrome-webidl/JSWindowActor.webidl
+++ b/dom/chrome-webidl/JSWindowActor.webidl
@@ -11,34 +11,34 @@ interface mixin JSWindowActor {
   void sendAsyncMessage(DOMString messageName,
                         optional any obj);
 
   [Throws]
   Promise<any> sendQuery(DOMString messageName,
                          optional any obj);
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface JSWindowActorParent {
   [ChromeOnly]
   constructor();
 
   /**
    * Actor initialization occurs after the constructor is called but before the
    * first message is delivered. Until the actor is initialized, accesses to
    * manager will fail.
    */
   readonly attribute WindowGlobalParent? manager;
 
   [Throws]
   readonly attribute CanonicalBrowsingContext? browsingContext;
 };
 JSWindowActorParent includes JSWindowActor;
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface JSWindowActorChild {
   [ChromeOnly]
   constructor();
   
   /**
    * Actor initialization occurs after the constructor is called but before the
    * first message is delivered. Until the actor is initialized, accesses to
    * manager will fail.
@@ -66,16 +66,17 @@ JSWindowActorChild includes JSWindowActo
 
 /**
  * WebIDL callback interface version of the nsIObserver interface for use when
  * calling the observe method on JSWindowActors.
  *
  * NOTE: This isn't marked as ChromeOnly, as it has no interface object, and
  * thus cannot be conditionally exposed.
  */
+[Exposed=Window]
 callback interface MozObserverCallback {
   void observe(nsISupports subject, ByteString topic, DOMString? data);
 };
 
 /**
  * WebIDL callback interface calling the `willDestroy`, `didDestroy`, and
  * `actorCreated` methods on JSWindowActors.
  */
--- a/dom/chrome-webidl/L10nOverlays.webidl
+++ b/dom/chrome-webidl/L10nOverlays.webidl
@@ -5,17 +5,18 @@
 
 dictionary L10nOverlaysError {
   short code;
   DOMString translatedElementName;
   DOMString sourceElementName;
   DOMString l10nName;
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 namespace L10nOverlays {
   const unsigned short ERROR_FORBIDDEN_TYPE = 1;
   const unsigned short ERROR_NAMED_ELEMENT_MISSING = 2;
   const unsigned short ERROR_NAMED_ELEMENT_TYPE_MISMATCH = 3;
   const unsigned short ERROR_UNKNOWN = 4;
 
   sequence<L10nOverlaysError>? translateElement(Element element, optional L10nMessage translation = {});
 };
--- a/dom/chrome-webidl/Localization.webidl
+++ b/dom/chrome-webidl/Localization.webidl
@@ -57,17 +57,17 @@ callback GenerateMessages = Promise<any>
  * Methods:
  *    - addResourceIds     - add resources
  *    - removeResourceIds  - remove resources
  *    - formatValue        - format a single value
  *    - formatValues       - format multiple values
  *    - formatMessages     - format multiple compound messages
  *
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface Localization {
   /**
    * Constructor arguments:
    *    - aResourceids       - a list of localization resource URIs
    *                           which will provide messages for this
    *                           Localization instance.
    *    - aGenerateMessages  - a callback function which will be
    *                           used to generate an iterator
--- a/dom/chrome-webidl/MessageManager.webidl
+++ b/dom/chrome-webidl/MessageManager.webidl
@@ -198,16 +198,17 @@ dictionary ReceiveMessageArgument
   /**
    * Principal for the window app.
    */
   required Principal? principal;
 
   FrameLoader targetFrameLoader;
 };
 
+[Exposed=Window]
 callback interface MessageListener
 {
   /**
    * Each listener is invoked with its own copy of the message
    * parameter.
    *
    * When the listener is called, 'this' value is the target of the message.
    *
@@ -215,17 +216,17 @@ callback interface MessageListener
    * returned as JSON (will be changed to use structured clones).
    * When there are multiple listeners to sync messages, each
    * listener's return value is sent back as an array.  |undefined|
    * return values show up as undefined values in the array.
    */
   any receiveMessage(ReceiveMessageArgument argument);
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MessageListenerManager
 {
   // All the methods are pulled in via mixin.
 };
 MessageListenerManager includes MessageListenerManagerMixin;
 
 interface mixin MessageListenerManagerMixin
 {
@@ -281,17 +282,17 @@ interface mixin MessageListenerManagerMi
 };
 
 /**
  * Message "senders" have a single "other side" to which messages are
  * sent.  For example, a child-process message manager will send
  * messages that are only delivered to its one parent-process message
  * manager.
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MessageSender : MessageListenerManager
 {
   // All the methods are pulled in via mixin.
 };
 MessageSender includes MessageSenderMixin;
 
 /**
  * Anyone including this MUST also incude MessageListenerManagerMixin.
@@ -331,17 +332,17 @@ interface mixin MessageSenderMixin {
   /**
    * For remote browsers, this contains the remoteType of the content child.
    * Otherwise, it is empty.
    */
   [Throws]
   readonly attribute DOMString remoteType;
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface SyncMessageSender : MessageSender
 {
   // All the methods are pulled in via mixin.
 };
 SyncMessageSender includes SyncMessageSenderMixin;
 
 /**
  * Anyone including this MUST also incude MessageSenderMixin.
@@ -374,17 +375,17 @@ interface mixin SyncMessageSenderMixin
                                optional object? objects = null,
                                optional Principal? principal = null);
 };
 
 /**
  * ChildProcessMessageManager is used in a child process to communicate with the parent
  * process.
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ChildProcessMessageManager : SyncMessageSender
 {
 };
 
 /**
  * Mixin for message manager globals.  Anyone including this MUST also
  * include SyncMessageSenderMixin.
  */
@@ -482,17 +483,17 @@ interface mixin GlobalProcessScriptLoade
    * unique enough that other Gecko consumers won't accidentally choose it.
    */
   [Throws]
   readonly attribute any initialProcessData;
 
   readonly attribute MozWritableSharedMap sharedData;
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ContentFrameMessageManager : EventTarget
 {
   /**
    * The current top level window in the frame or null.
    */
   [Throws]
   readonly attribute WindowProxy? content;
 
@@ -516,17 +517,17 @@ interface ContentFrameMessageManager : E
   readonly attribute long long chromeOuterWindowID;
 
 };
 ContentFrameMessageManager includes MessageManagerGlobal;
 ContentFrameMessageManager includes SyncMessageSenderMixin;
 ContentFrameMessageManager includes MessageSenderMixin;
 ContentFrameMessageManager includes MessageListenerManagerMixin;
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ContentProcessMessageManager
 {
   /**
    * Read out a copy of the object that was initialized in the parent
    * process via ProcessScriptLoader.initialProcessData.
    */
   [Throws]
   readonly attribute any initialProcessData;
@@ -539,17 +540,17 @@ ContentProcessMessageManager includes Me
 ContentProcessMessageManager includes MessageListenerManagerMixin;
 
 /**
  * Message "broadcasters" don't have a single "other side" that they send messages to, but
  * rather a set of subordinate message managers. For example, broadcasting a message
  * through a window message manager will broadcast the message to all frame message
  * managers within its window.
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MessageBroadcaster : MessageListenerManager
 {
   /**
    * Like |sendAsyncMessage()|, but also broadcasts this message to
    * all "child" message managers of this message manager.  See long
    * comment above for details.
    *
    * WARNING: broadcasting messages can be very expensive and leak
@@ -575,40 +576,40 @@ interface MessageBroadcaster : MessageLi
    * (see dom.ipc.keepProcessesAlive). This function releases those.
    */
    void releaseCachedProcesses();
 };
 
 /**
  * ChromeMessageBroadcaster is used for window and group message managers.
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ChromeMessageBroadcaster : MessageBroadcaster
 {
 };
 ChromeMessageBroadcaster includes FrameScriptLoader;
 
 /**
  * ParentProcessMessageManager is used in a parent process to communicate with all the
  * child processes.
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ParentProcessMessageManager : MessageBroadcaster
 {
 };
 ParentProcessMessageManager includes ProcessScriptLoader;
 ParentProcessMessageManager includes GlobalProcessScriptLoader;
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ChromeMessageSender : MessageSender
 {
 };
 ChromeMessageSender includes FrameScriptLoader;
 
 /**
  * ProcessMessageManager is used in a parent process to communicate with a child process
  * (or with the process itself in a single-process scenario).
  */
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface ProcessMessageManager : MessageSender
 {
 };
 ProcessMessageManager includes ProcessScriptLoader;
--- a/dom/chrome-webidl/MozDocumentObserver.webidl
+++ b/dom/chrome-webidl/MozDocumentObserver.webidl
@@ -1,14 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+[Exposed=Window]
 callback interface MozDocumentCallback {
   void onNewDocument(MozDocumentMatcher matcher, WindowProxy window);
   void onPreloadDocument(MozDocumentMatcher matcher, LoadInfo loadInfo);
 };
 
 [ChromeOnly, Exposed=Window]
 interface MozDocumentObserver {
   constructor(MozDocumentCallback callbacks);
--- a/dom/chrome-webidl/MozSharedMap.webidl
+++ b/dom/chrome-webidl/MozSharedMap.webidl
@@ -1,37 +1,37 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 typedef any StructuredClonable;
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MozSharedMapChangeEvent : Event {
   [Cached, Constant]
   readonly attribute sequence<DOMString> changedKeys;
 };
 
 dictionary MozSharedMapChangeEventInit : EventInit {
   required sequence<DOMString> changedKeys;
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MozSharedMap : EventTarget {
   boolean has(DOMString name);
 
   [Throws]
   StructuredClonable get(DOMString name);
 
   iterable<DOMString, StructuredClonable>;
 };
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MozWritableSharedMap : MozSharedMap {
   /**
    * Sets the given key to the given structured-clonable value. The value is
    * synchronously structured cloned, and the serialized value is saved in the
    * map.
    *
    * Unless flush() is called, the new value will be broadcast to content
    * processes after a short delay.
--- a/dom/chrome-webidl/MozStorageAsyncStatementParams.webidl
+++ b/dom/chrome-webidl/MozStorageAsyncStatementParams.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MozStorageAsyncStatementParams
 {
   readonly attribute unsigned long length;
 
   [Throws]
   getter any(unsigned long index);
 
   [Throws]
--- a/dom/chrome-webidl/MozStorageStatementParams.webidl
+++ b/dom/chrome-webidl/MozStorageStatementParams.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MozStorageStatementParams
 {
   readonly attribute unsigned long length;
 
   [Throws]
   getter any(unsigned long index);
 
   [Throws]
--- a/dom/chrome-webidl/MozStorageStatementRow.webidl
+++ b/dom/chrome-webidl/MozStorageStatementRow.webidl
@@ -1,11 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface MozStorageStatementRow
 {
   [Throws]
   getter any(DOMString name);
 };
--- a/dom/chrome-webidl/PromiseDebugging.webidl
+++ b/dom/chrome-webidl/PromiseDebugging.webidl
@@ -24,16 +24,17 @@ enum PromiseDebuggingState { "pending", 
  * - in `rejected` state;
  * - last of their chain.
  *
  * Note, however, that a promise in such a state at the end of a tick
  * may eventually be consumed in some ulterior tick. Implementers of
  * this interface are responsible for presenting the information
  * in a meaningful manner.
  */
+[Exposed=Window]
 callback interface UncaughtRejectionObserver {
   /**
    * A Promise has been left in `rejected` state and is the
    * last in its chain. If this callback returns true, the rejection
    * will not be reported.
    *
    * @param p A currently uncaught Promise. If `p` is is eventually
    * caught, i.e. if its `then` callback is called, `onConsumed` will
--- a/dom/chrome-webidl/XULFrameElement.webidl
+++ b/dom/chrome-webidl/XULFrameElement.webidl
@@ -1,17 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 interface nsIDocShell;
 interface nsIWebNavigation;
 
-[HTMLConstructor, Func="IsChromeOrXBL"]
+[HTMLConstructor, Func="IsChromeOrXBL",
+ Exposed=Window]
 interface XULFrameElement : XULElement
 {
   readonly attribute nsIDocShell? docShell;
   readonly attribute nsIWebNavigation? webNavigation;
 
   readonly attribute WindowProxy? contentWindow;
   readonly attribute Document? contentDocument; 
 };
--- a/dom/chrome-webidl/XULMenuElement.webidl
+++ b/dom/chrome-webidl/XULMenuElement.webidl
@@ -1,16 +1,17 @@
 
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[HTMLConstructor, Func="IsChromeOrXBL"]
+[HTMLConstructor, Func="IsChromeOrXBL",
+ Exposed=Window]
 interface XULMenuElement : XULElement {
 
   attribute Element? activeChild;
 
   boolean handleKeyPress(KeyboardEvent keyEvent);
 
   readonly attribute boolean openedWithKey;
 
--- a/dom/chrome-webidl/XULTextElement.webidl
+++ b/dom/chrome-webidl/XULTextElement.webidl
@@ -1,13 +1,14 @@
 
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[HTMLConstructor, Func="IsChromeOrXBL"]
+[HTMLConstructor, Func="IsChromeOrXBL",
+ Exposed=Window]
 interface XULTextElement : XULElement {
   attribute boolean disabled;
   attribute DOMString value;
   attribute DOMString accessKey;
 };
--- a/dom/chrome-webidl/XULTreeElement.webidl
+++ b/dom/chrome-webidl/XULTreeElement.webidl
@@ -8,17 +8,18 @@
 interface MozTreeView;
 
 dictionary TreeCellInfo {
     long row = 0;
     TreeColumn? col = null;
     DOMString childElt = "";
 };
 
-[HTMLConstructor, Func="IsChromeOrXBL"]
+[HTMLConstructor, Func="IsChromeOrXBL",
+ Exposed=Window]
 interface XULTreeElement : XULElement
 {
   /**
    * Obtain the columns.
    */
   readonly attribute TreeColumns? columns;
 
   /**
--- a/dom/webidl/APZTestData.webidl
+++ b/dom/webidl/APZTestData.webidl
@@ -25,17 +25,18 @@ dictionary ScrollFrameData {
 
 // All the scrollable frames associated with a given paint or repaint request.
 // The paint or repaint request is identified by a sequence number.
 dictionary APZBucket {
   unsigned long sequenceNumber;
   sequence<ScrollFrameData> scrollFrames;
 };
 
-[Pref="apz.test.logging_enabled"]
+[Pref="apz.test.logging_enabled",
+ Exposed=Window]
 namespace APZHitResultFlags {
   // These constants should be kept in sync with mozilla::gfx::CompositorHitTestInfo
   const unsigned short INVISIBLE = 0;
   const unsigned short VISIBLE = 0x0001;
   const unsigned short IRREGULAR_AREA = 0x0002;
   const unsigned short APZ_AWARE_LISTENERS = 0x0004;
   const unsigned short INACTIVE_SCROLLFRAME = 0x0008;
   const unsigned short PAN_X_DISABLED = 0x0010;
--- a/dom/webidl/AbstractRange.webidl
+++ b/dom/webidl/AbstractRange.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * https://dom.spec.whatwg.org/#abstractrange
  *
  * Copyright  2012 W3C  (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface AbstractRange {
   [BinaryName="GetStartContainer"]
   readonly attribute Node startContainer;
   readonly attribute unsigned long startOffset;
   [BinaryName="GetEndContainer"]
   readonly attribute Node endContainer;
   readonly attribute unsigned long endOffset;
   readonly attribute boolean collapsed;
--- a/dom/webidl/AccessibleNode.webidl
+++ b/dom/webidl/AccessibleNode.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Func="mozilla::dom::AccessibleNode::IsAOMEnabled"]
+[Func="mozilla::dom::AccessibleNode::IsAOMEnabled",
+ Exposed=Window]
 interface AccessibleNode {
   readonly attribute DOMString computedRole;
   [Frozen, Cached, Pure]
   readonly attribute sequence<DOMString> states;
   [Frozen, Cached, Pure]
   readonly attribute sequence<DOMString> attributes;
   readonly attribute Node? DOMNode;
 
--- a/dom/webidl/AddonEvent.webidl
+++ b/dom/webidl/AddonEvent.webidl
@@ -1,9 +1,10 @@
-[Func="mozilla::AddonManagerWebAPI::IsAPIEnabled"]
+[Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
+ Exposed=Window]
 interface AddonEvent : Event {
   constructor(DOMString type, AddonEventInit eventInitDict);
 
   readonly attribute DOMString id;
 };
 
 dictionary AddonEventInit : EventInit {
   required DOMString id;
--- a/dom/webidl/AddonManager.webidl
+++ b/dom/webidl/AddonManager.webidl
@@ -1,17 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 /* We need a JSImplementation but cannot get one without a contract ID.
    Since Addon and AddonInstall are only ever created from JS they don't need
    real contract IDs. */
-[ChromeOnly, JSImplementation="dummy"]
+[ChromeOnly, JSImplementation="dummy",
+ Exposed=Window]
 interface Addon {
   // The add-on's ID.
   readonly attribute DOMString id;
   // The add-on's version.
   readonly attribute DOMString version;
   // The add-on's type (extension, theme, etc.).
   readonly attribute DOMString type;
   // The add-on's name in the current locale.
@@ -26,17 +27,18 @@ interface Addon {
   readonly attribute boolean isActive;
   // If the add-on may be uninstalled
   readonly attribute boolean canUninstall;
 
   Promise<boolean> uninstall();
   Promise<void> setEnabled(boolean value);
 };
 
-[ChromeOnly, JSImplementation="dummy"]
+[ChromeOnly, JSImplementation="dummy",
+ Exposed=Window]
 interface AddonInstall : EventTarget {
   // One of the STATE_* symbols from AddonManager.jsm
   readonly attribute DOMString state;
   // One of the ERROR_* symbols from AddonManager.jsm, or null
   readonly attribute DOMString? error;
   // How many bytes have been downloaded
   readonly attribute long long progress;
   // How many total bytes will need to be downloaded or -1 if unknown
@@ -52,17 +54,18 @@ dictionary addonInstallOptions {
   // checksum of the downloaded XPI before installing.  If is omitted or if
   // it is null or empty string, no checksum verification is performed.
   DOMString? hash = null;
 };
 
 [HeaderFile="mozilla/AddonManagerWebAPI.h",
  Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
  JSImplementation="@mozilla.org/addon-web-api/manager;1",
- WantsEventListenerHooks]
+ WantsEventListenerHooks,
+ Exposed=Window]
 interface AddonManager : EventTarget {
   /**
    * Gets information about an add-on
    *
    * @param  id
    *         The ID of the add-on to test for.
    * @return A promise. It will resolve to an Addon if the add-on is installed.
    */
--- a/dom/webidl/AnalyserNode.webidl
+++ b/dom/webidl/AnalyserNode.webidl
@@ -12,17 +12,18 @@
 
 dictionary AnalyserOptions : AudioNodeOptions {
              unsigned long fftSize = 2048;
              double        maxDecibels = -30;
              double        minDecibels = -100;
              double        smoothingTimeConstant = 0.8;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AnalyserNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context,
                 optional AnalyserOptions options = {});
 
     // Real-time frequency-domain data
     void getFloatFrequencyData(Float32Array array);
     void getByteFrequencyData(Uint8Array array);
--- a/dom/webidl/Animation.webidl
+++ b/dom/webidl/Animation.webidl
@@ -9,16 +9,17 @@
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 enum AnimationPlayState { "idle", "running", "paused", "finished" };
 
 enum AnimationReplaceState { "active", "removed", "persisted" };
 
+[Exposed=Window]
 interface Animation : EventTarget {
   [Throws]
   constructor(optional AnimationEffect? effect = null,
               optional AnimationTimeline? timeline);
 
   attribute DOMString id;
   [Func="Document::IsWebAnimationsEnabled", Pure]
   attribute AnimationEffect? effect;
--- a/dom/webidl/AnimationEffect.webidl
+++ b/dom/webidl/AnimationEffect.webidl
@@ -50,16 +50,17 @@ dictionary OptionalEffectTiming {
 dictionary ComputedEffectTiming : EffectTiming {
   unrestricted double   endTime = 0.0;
   unrestricted double   activeDuration = 0.0;
   double?               localTime = null;
   double?               progress = null;
   unrestricted double?  currentIteration = null;
 };
 
-[Func="Document::IsWebAnimationsEnabled"]
+[Func="Document::IsWebAnimationsEnabled",
+ Exposed=Window]
 interface AnimationEffect {
   EffectTiming getTiming();
   [BinaryName="getComputedTimingAsDict"]
   ComputedEffectTiming getComputedTiming();
   [Throws]
   void updateTiming(optional OptionalEffectTiming timing = {});
 };
--- a/dom/webidl/AnimationEvent.webidl
+++ b/dom/webidl/AnimationEvent.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://www.w3.org/TR/css3-animations/#animation-events-
  * http://dev.w3.org/csswg/css3-animations/#animation-events-
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface AnimationEvent : Event {
   constructor(DOMString type, optional AnimationEventInit eventInitDict = {});
 
   readonly attribute DOMString animationName;
   readonly attribute float     elapsedTime;
   readonly attribute DOMString pseudoElement;
 };
 
--- a/dom/webidl/AnimationPlaybackEvent.webidl
+++ b/dom/webidl/AnimationPlaybackEvent.webidl
@@ -5,17 +5,18 @@
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/web-animations/#animationplaybackevent
  *
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Func="Document::IsWebAnimationsEnabled"]
+[Func="Document::IsWebAnimationsEnabled",
+ Exposed=Window]
 interface AnimationPlaybackEvent : Event {
   constructor(DOMString type,
               optional AnimationPlaybackEventInit eventInitDict = {});
 
   readonly attribute double? currentTime;
   readonly attribute double? timelineTime;
 };
 
--- a/dom/webidl/AnimationTimeline.webidl
+++ b/dom/webidl/AnimationTimeline.webidl
@@ -5,13 +5,14 @@
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/web-animations/#animationtimeline
  *
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Func="Document::AreWebAnimationsTimelinesEnabled"]
+[Func="Document::AreWebAnimationsTimelinesEnabled",
+ Exposed=Window]
 interface AnimationTimeline {
   [BinaryName="currentTimeAsDouble"]
   readonly attribute double? currentTime;
 };
--- a/dom/webidl/AnonymousContent.webidl
+++ b/dom/webidl/AnonymousContent.webidl
@@ -11,17 +11,17 @@
  * See Document.insertAnonymousContent.
  *
  * This API never returns a reference to the actual inserted DOM node on
  * purpose. This is to make sure the content cannot be randomly changed and the
  * DOM cannot be traversed from the node, so that Gecko can remain in control of
  * the inserted content.
  */
 
-[ChromeOnly]
+[ChromeOnly, Exposed=Window]
 interface AnonymousContent {
   /**
    * Get the text content of an element inside this custom anonymous content.
    */
   [Throws]
   DOMString getTextContentForElement(DOMString elementId);
 
   /**
--- a/dom/webidl/Attr.webidl
+++ b/dom/webidl/Attr.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120105/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface Attr : Node {
   readonly attribute DOMString localName;
            [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
            attribute DOMString value;
 
   [Constant]
   readonly attribute DOMString name;
   [Constant]
--- a/dom/webidl/AudioBuffer.webidl
+++ b/dom/webidl/AudioBuffer.webidl
@@ -11,17 +11,18 @@
  */
 
 dictionary AudioBufferOptions {
              unsigned long numberOfChannels = 1;
     required unsigned long length;
     required float         sampleRate;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioBuffer {
     [Throws]
     constructor(AudioBufferOptions options);
 
     readonly attribute float sampleRate;
     readonly attribute unsigned long length;
 
     // in seconds 
--- a/dom/webidl/AudioBufferSourceNode.webidl
+++ b/dom/webidl/AudioBufferSourceNode.webidl
@@ -14,17 +14,18 @@ dictionary AudioBufferSourceOptions {
              AudioBuffer? buffer;
              float        detune = 0;
              boolean      loop = false;
              double       loopEnd = 0;
              double       loopStart = 0;
              float        playbackRate = 1;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioBufferSourceNode : AudioScheduledSourceNode {
     constructor(BaseAudioContext context,
                 optional AudioBufferSourceOptions options = {});
 
     attribute AudioBuffer? buffer;
 
     readonly attribute AudioParam playbackRate;
     readonly attribute AudioParam detune;
--- a/dom/webidl/AudioContext.webidl
+++ b/dom/webidl/AudioContext.webidl
@@ -14,17 +14,18 @@ dictionary AudioContextOptions {
              float        sampleRate = 0;
 };
 
 dictionary AudioTimestamp {
   double contextTime;
   DOMHighResTimeStamp performanceTime;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioContext : BaseAudioContext {
     [Throws]
     constructor(optional AudioContextOptions contextOptions = {});
 
     readonly        attribute double               baseLatency;
     readonly        attribute double               outputLatency;
     AudioTimestamp                  getOutputTimestamp();
 
--- a/dom/webidl/AudioDestinationNode.webidl
+++ b/dom/webidl/AudioDestinationNode.webidl
@@ -5,15 +5,16 @@
  *
  * The origin of this IDL file is
  * https://webaudio.github.io/web-audio-api/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioDestinationNode : AudioNode {
 
     readonly attribute unsigned long maxChannelCount;
 
 };
 
--- a/dom/webidl/AudioListener.webidl
+++ b/dom/webidl/AudioListener.webidl
@@ -5,15 +5,16 @@
  *
  * The origin of this IDL file is
  * https://webaudio.github.io/web-audio-api/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioListener {
     // Uses a 3D cartesian coordinate system
     void setPosition(double x, double y, double z);
     void setOrientation(double x, double y, double z, double xUp, double yUp, double zUp);
 };
 
--- a/dom/webidl/AudioNode.webidl
+++ b/dom/webidl/AudioNode.webidl
@@ -22,17 +22,18 @@ enum ChannelInterpretation {
 };
 
 dictionary AudioNodeOptions {
              unsigned long         channelCount;
              ChannelCountMode      channelCountMode;
              ChannelInterpretation channelInterpretation;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioNode : EventTarget {
 
     [Throws]
     AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
     [Throws]
     void connect(AudioParam destination, optional unsigned long output = 0);
     [Throws]
     void disconnect();
--- a/dom/webidl/AudioParam.webidl
+++ b/dom/webidl/AudioParam.webidl
@@ -10,17 +10,18 @@
  * liability, trademark and document use rules apply.
  */
 
 enum AutomationRate {
     "a-rate",
     "k-rate"
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioParam {
 
                     attribute float value;
     readonly        attribute float defaultValue;
     readonly        attribute float minValue;
     readonly        attribute float maxValue;
 
     // Parameter automation. 
--- a/dom/webidl/AudioParamMap.webidl
+++ b/dom/webidl/AudioParamMap.webidl
@@ -5,12 +5,13 @@
  *
  * The origin of this IDL file is
  * https://webaudio.github.io/web-audio-api/#audioparammap
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Pref="dom.audioworklet.enabled"]
+[Pref="dom.audioworklet.enabled",
+ Exposed=Window]
 interface AudioParamMap {
     readonly maplike<DOMString, AudioParam>;
 };
--- a/dom/webidl/AudioProcessingEvent.webidl
+++ b/dom/webidl/AudioProcessingEvent.webidl
@@ -5,17 +5,18 @@
  *
  * The origin of this IDL file is
  * https://webaudio.github.io/web-audio-api/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface AudioProcessingEvent : Event {
 
   readonly attribute double playbackTime;
 
   [Throws]
   readonly attribute AudioBuffer inputBuffer;
   [Throws]
   readonly attribute AudioBuffer outputBuffer;
--- a/dom/webidl/AudioScheduledSourceNode.webidl
+++ b/dom/webidl/AudioScheduledSourceNode.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * https://webaudio.github.io/web-audio-api/#idl-def-AudioScheduledSourceNode
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface AudioScheduledSourceNode : AudioNode {
                     attribute EventHandler onended;
     [Throws]
     void start (optional double when = 0);
 
     [Throws]
     void stop (optional double when = 0);
 };
--- a/dom/webidl/AudioTrack.webidl
+++ b/dom/webidl/AudioTrack.webidl
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#audiotrack
  */
 
-[Pref="media.track.enabled"]
+[Pref="media.track.enabled",
+ Exposed=Window]
 interface AudioTrack {
   readonly attribute DOMString id;
   readonly attribute DOMString kind;
   readonly attribute DOMString label;
   readonly attribute DOMString language;
            attribute boolean enabled;
 };
--- a/dom/webidl/AudioTrackList.webidl
+++ b/dom/webidl/AudioTrackList.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist
  */
 
-[Pref="media.track.enabled"]
+[Pref="media.track.enabled",
+ Exposed=Window]
 interface AudioTrackList : EventTarget {
   readonly attribute unsigned long length;
   getter AudioTrack (unsigned long index);
   AudioTrack? getTrackById(DOMString id);
 
            attribute EventHandler onchange;
            attribute EventHandler onaddtrack;
            attribute EventHandler onremovetrack;
--- a/dom/webidl/AudioWorklet.webidl
+++ b/dom/webidl/AudioWorklet.webidl
@@ -7,9 +7,9 @@
  * https://webaudio.github.io/web-audio-api/
  *
  * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 [Exposed=Window, SecureContext, Pref="dom.audioworklet.enabled"]
 interface AudioWorklet : Worklet {
-};
\ No newline at end of file
+};
--- a/dom/webidl/AudioWorkletNode.webidl
+++ b/dom/webidl/AudioWorkletNode.webidl
@@ -13,17 +13,18 @@
 dictionary AudioWorkletNodeOptions : AudioNodeOptions {
              unsigned long             numberOfInputs = 1;
              unsigned long             numberOfOutputs = 1;
              sequence<unsigned long>   outputChannelCount;
              record<DOMString, double> parameterData;
              object?                   processorOptions = null;
 };
 
-[SecureContext, Pref="dom.audioworklet.enabled"]
+[SecureContext, Pref="dom.audioworklet.enabled",
+ Exposed=Window]
 interface AudioWorkletNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context, DOMString name,
                 optional AudioWorkletNodeOptions options = {});
 
     [Throws]
     readonly        attribute AudioParamMap              parameters;
     [Throws]
--- a/dom/webidl/BarProp.webidl
+++ b/dom/webidl/BarProp.webidl
@@ -1,11 +1,12 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+[Exposed=Window]
 interface BarProp
 {
   [Throws, NeedsCallerType]
            attribute boolean visible;
 };
--- a/dom/webidl/BaseAudioContext.webidl
+++ b/dom/webidl/BaseAudioContext.webidl
@@ -14,16 +14,17 @@ callback DecodeSuccessCallback = void (A
 callback DecodeErrorCallback = void (DOMException error);
 
 enum AudioContextState {
     "suspended",
     "running",
     "closed"
 };
 
+[Exposed=Window]
 interface BaseAudioContext : EventTarget {
     readonly        attribute AudioDestinationNode destination;
     readonly        attribute float                sampleRate;
     readonly        attribute double               currentTime;
     readonly        attribute AudioListener        listener;
     readonly        attribute AudioContextState    state;
     [Throws, SameObject, SecureContext, Pref="dom.audioworklet.enabled"]
     readonly        attribute AudioWorklet         audioWorklet;
--- a/dom/webidl/BatteryManager.webidl
+++ b/dom/webidl/BatteryManager.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/battery-status/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface BatteryManager : EventTarget {
     readonly attribute boolean             charging;
     readonly attribute unrestricted double chargingTime;
     readonly attribute unrestricted double dischargingTime;
     readonly attribute double              level;
 
              attribute EventHandler        onchargingchange;
              attribute EventHandler        onchargingtimechange;
--- a/dom/webidl/BeforeUnloadEvent.webidl
+++ b/dom/webidl/BeforeUnloadEvent.webidl
@@ -2,11 +2,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
  */
 
+[Exposed=Window]
 interface BeforeUnloadEvent : Event {
   attribute DOMString returnValue;
 };
--- a/dom/webidl/BiquadFilterNode.webidl
+++ b/dom/webidl/BiquadFilterNode.webidl
@@ -24,17 +24,18 @@ enum BiquadFilterType {
 dictionary BiquadFilterOptions : AudioNodeOptions {
              BiquadFilterType type = "lowpass";
              float            Q = 1;
              float            detune = 0;
              float            frequency = 350;
              float            gain = 0;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface BiquadFilterNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context,
                 optional BiquadFilterOptions options = {});
 
     attribute BiquadFilterType type;
     readonly attribute AudioParam frequency; // in Hertz
     readonly attribute AudioParam detune; // in Cents
--- a/dom/webidl/BlobEvent.webidl
+++ b/dom/webidl/BlobEvent.webidl
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * https://w3c.github.io/mediacapture-record/#blobevent-section
  */
 
+[Exposed=Window]
 interface BlobEvent : Event
 {
   constructor(DOMString type, optional BlobEventInit eventInitDict = {});
   readonly attribute Blob? data;
 };
 
 dictionary BlobEventInit : EventInit
 {
--- a/dom/webidl/CDATASection.webidl
+++ b/dom/webidl/CDATASection.webidl
@@ -1,8 +1,9 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+[Exposed=Window]
 interface CDATASection : Text {
 };
--- a/dom/webidl/CSS.webidl
+++ b/dom/webidl/CSS.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://dev.w3.org/csswg/css3-conditional/
  * http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 namespace CSS {
   [Throws]
   boolean supports(DOMString property, DOMString value);
 
   [Throws]
   boolean supports(DOMString conditionText);
 };
 
--- a/dom/webidl/CSS2Properties.webidl.in
+++ b/dom/webidl/CSS2Properties.webidl.in
@@ -1,3 +1,4 @@
+[Exposed=Window]
 interface CSS2Properties : CSSStyleDeclaration {
 ${props}
 };
--- a/dom/webidl/CSSAnimation.webidl
+++ b/dom/webidl/CSSAnimation.webidl
@@ -6,12 +6,13 @@
  * The origin of this IDL file is
  * http://dev.w3.org/csswg/css-animations-2/#the-CSSAnimation-interface
  *
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 [Func="Document::IsWebAnimationsGetAnimationsEnabled",
- HeaderFile="nsAnimationManager.h"]
+ HeaderFile="nsAnimationManager.h",
+ Exposed=Window]
 interface CSSAnimation : Animation {
   [Constant] readonly attribute DOMString animationName;
 };
--- a/dom/webidl/CSSConditionRule.webidl
+++ b/dom/webidl/CSSConditionRule.webidl
@@ -3,12 +3,13 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
  */
 
 // https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
+[Exposed=Window]
 interface CSSConditionRule : CSSGroupingRule {
   [SetterThrows]
   attribute DOMString conditionText;
 };
--- a/dom/webidl/CSSCounterStyleRule.webidl
+++ b/dom/webidl/CSSCounterStyleRule.webidl
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface
  */
 
 // https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface
+[Exposed=Window]
 interface CSSCounterStyleRule : CSSRule {
   attribute DOMString name;
   attribute DOMString system;
   attribute DOMString symbols;
   attribute DOMString additiveSymbols;
   attribute DOMString negative;
   attribute DOMString prefix;
   attribute DOMString suffix;
--- a/dom/webidl/CSSFontFaceRule.webidl
+++ b/dom/webidl/CSSFontFaceRule.webidl
@@ -5,11 +5,12 @@
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-fonts/#om-fontface
  */
 
 // https://drafts.csswg.org/css-fonts/#om-fontface
 // But we implement a very old draft, apparently....
 // See bug 1058408 for implementing the current spec.
+[Exposed=Window]
 interface CSSFontFaceRule : CSSRule {
   [SameObject] readonly attribute CSSStyleDeclaration style;
 };
--- a/dom/webidl/CSSFontFeatureValuesRule.webidl
+++ b/dom/webidl/CSSFontFeatureValuesRule.webidl
@@ -4,16 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues
  */
 
 // https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues
 // but we don't implement anything remotely resembling the spec.
+[Exposed=Window]
 interface CSSFontFeatureValuesRule : CSSRule {
   [SetterThrows]
   attribute DOMString fontFamily;
 
   // Not yet implemented
   //  readonly attribute CSSFontFeatureValuesMap annotation;
   //  readonly attribute CSSFontFeatureValuesMap ornaments;
   //  readonly attribute CSSFontFeatureValuesMap stylistic;
--- a/dom/webidl/CSSGroupingRule.webidl
+++ b/dom/webidl/CSSGroupingRule.webidl
@@ -3,15 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/cssom/#cssgroupingrule
  */
 
 // https://drafts.csswg.org/cssom/#cssgroupingrule
+[Exposed=Window]
 interface CSSGroupingRule : CSSRule {
   [SameObject] readonly attribute CSSRuleList cssRules;
   [Throws]
   unsigned long insertRule(DOMString rule, optional unsigned long index = 0);
   [Throws]
   void deleteRule(unsigned long index);
 };
--- a/dom/webidl/CSSImportRule.webidl
+++ b/dom/webidl/CSSImportRule.webidl
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/cssom/#cssimportrule
  */
 
 // https://drafts.csswg.org/cssom/#cssimportrule
+[Exposed=Window]
 interface CSSImportRule : CSSRule {
   readonly attribute DOMString href;
   // Per spec, the .media is never null, but in our implementation it can
   // be since stylesheet can be null, and in Stylo, media is derived from
   // the stylesheet.  See <https://bugzilla.mozilla.org/show_bug.cgi?id=1326509>.
   [SameObject, PutForwards=mediaText] readonly attribute MediaList? media;
   // Per spec, the .styleSheet is never null, but in our implementation it can
   // be.  See <https://bugzilla.mozilla.org/show_bug.cgi?id=1326509>.
--- a/dom/webidl/CSSKeyframeRule.webidl
+++ b/dom/webidl/CSSKeyframeRule.webidl
@@ -3,12 +3,13 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-animations/#interface-csskeyframerule
  */
 
 // https://drafts.csswg.org/css-animations/#interface-csskeyframerule
+[Exposed=Window]
 interface CSSKeyframeRule : CSSRule {
   attribute DOMString keyText;
   [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
 };
--- a/dom/webidl/CSSKeyframesRule.webidl
+++ b/dom/webidl/CSSKeyframesRule.webidl
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
  */
 
 // https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
+[Exposed=Window]
 interface CSSKeyframesRule : CSSRule {
            attribute DOMString   name;
   readonly attribute CSSRuleList cssRules;
 
   void            appendRule(DOMString rule);
   void            deleteRule(DOMString select);
   CSSKeyframeRule? findRule(DOMString select);
 };
--- a/dom/webidl/CSSMediaRule.webidl
+++ b/dom/webidl/CSSMediaRule.webidl
@@ -7,11 +7,12 @@
  * https://drafts.csswg.org/cssom/#the-cssmediarule-interface
  * https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
  */
 
 // https://drafts.csswg.org/cssom/#the-cssmediarule-interface and
 // https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
 // except they disagree with each other.  We're taking the inheritance from
 // css-conditional and the PutForwards behavior from cssom.
+[Exposed=Window]
 interface CSSMediaRule : CSSConditionRule {
   [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
 };
--- a/dom/webidl/CSSMozDocumentRule.webidl
+++ b/dom/webidl/CSSMozDocumentRule.webidl
@@ -1,10 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 // This is a non-standard interface for @-moz-document rules
+[Exposed=Window]
 interface CSSMozDocumentRule : CSSConditionRule {
   // XXX Add access to the URL list.
 };
--- a/dom/webidl/CSSNamespaceRule.webidl
+++ b/dom/webidl/CSSNamespaceRule.webidl
@@ -3,12 +3,13 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/cssom/#cssnamespacerule
  */
 
 // https://drafts.csswg.org/cssom/#cssnamespacerule
+[Exposed=Window]
 interface CSSNamespaceRule : CSSRule {
   readonly attribute DOMString namespaceURI;
   readonly attribute DOMString prefix;
 };
--- a/dom/webidl/CSSPageRule.webidl
+++ b/dom/webidl/CSSPageRule.webidl
@@ -5,13 +5,14 @@
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/cssom/#the-csspagerule-interface
  */
 
 // https://drafts.csswg.org/cssom/#the-csspagerule-interface
 // Per spec, this should inherit from CSSGroupingRule, but we don't
 // implement this yet.
+[Exposed=Window]
 interface CSSPageRule : CSSRule {
   // selectorText not implemented yet
   //         attribute DOMString selectorText;
   [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
 };
--- a/dom/webidl/CSSPseudoElement.webidl
+++ b/dom/webidl/CSSPseudoElement.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-pseudo-4/#csspseudoelement
  *
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Func="Document::IsWebAnimationsGetAnimationsEnabled"]
+[Func="Document::IsWebAnimationsGetAnimationsEnabled",
+ Exposed=Window]
 interface CSSPseudoElement {
   readonly attribute DOMString type;
   readonly attribute Element element;
 };
 
 // https://drafts.csswg.org/web-animations/#extensions-to-the-pseudoelement-interface
 CSSPseudoElement includes Animatable;
--- a/dom/webidl/CSSRule.webidl
+++ b/dom/webidl/CSSRule.webidl
@@ -7,16 +7,17 @@
  * https://drafts.csswg.org/cssom/#the-cssrule-interface
  * https://drafts.csswg.org/css-animations/#interface-cssrule
  * https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
  * https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
  * https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
  */
 
 // https://drafts.csswg.org/cssom/#the-cssrule-interface
+[Exposed=Window]
 interface CSSRule {
 
   const unsigned short STYLE_RULE = 1;
   const unsigned short CHARSET_RULE = 2; // historical
   const unsigned short IMPORT_RULE = 3;
   const unsigned short MEDIA_RULE = 4;
   const unsigned short FONT_FACE_RULE = 5;
   const unsigned short PAGE_RULE = 6;
--- a/dom/webidl/CSSRuleList.webidl
+++ b/dom/webidl/CSSRuleList.webidl
@@ -1,10 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+[Exposed=Window]
 interface CSSRuleList {
   readonly attribute unsigned long length;
   getter CSSRule? item(unsigned long index);
 };
--- a/dom/webidl/CSSStyleDeclaration.webidl
+++ b/dom/webidl/CSSStyleDeclaration.webidl
@@ -4,17 +4,18 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://dev.w3.org/csswg/cssom/
  */
 
  // Because of getComputedStyle, many CSSStyleDeclaration objects can be
  // short-living.
-[ProbablyShortLivingWrapper]
+[ProbablyShortLivingWrapper,
+ Exposed=Window]
 interface CSSStyleDeclaration {
   [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
   attribute DOMString cssText;
 
   readonly attribute unsigned long length;
   getter DOMString item(unsigned long index);
 
   [Throws, ChromeOnly]
--- a/dom/webidl/CSSStyleRule.webidl
+++ b/dom/webidl/CSSStyleRule.webidl
@@ -3,12 +3,13 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/cssom/#the-cssstylerule-interface
  */
 
 // https://drafts.csswg.org/cssom/#the-cssstylerule-interface
+[Exposed=Window]
 interface CSSStyleRule : CSSRule {
   attribute DOMString selectorText;
   [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
 };
--- a/dom/webidl/CSSStyleSheet.webidl
+++ b/dom/webidl/CSSStyleSheet.webidl
@@ -8,16 +8,17 @@
  */
 
 enum CSSStyleSheetParsingMode {
   "author",
   "user",
   "agent"
 };
 
+[Exposed=Window]
 interface CSSStyleSheet : StyleSheet {
   [Pure, BinaryName="DOMOwnerRule"]
   readonly attribute CSSRule? ownerRule;
   [Throws, NeedsSubjectPrincipal]
   readonly attribute CSSRuleList cssRules;
   [ChromeOnly, BinaryName="parsingModeDOM"]
   readonly attribute CSSStyleSheetParsingMode parsingMode;
   [Throws, NeedsSubjectPrincipal]
--- a/dom/webidl/CSSSupportsRule.webidl
+++ b/dom/webidl/CSSSupportsRule.webidl
@@ -3,10 +3,11 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
  */
 
 // https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
+[Exposed=Window]
 interface CSSSupportsRule : CSSConditionRule {
 };
--- a/dom/webidl/CSSTransition.webidl
+++ b/dom/webidl/CSSTransition.webidl
@@ -6,12 +6,13 @@
  * The origin of this IDL file is
  * http://dev.w3.org/csswg/css-transitions-2/#the-CSSTransition-interface
  *
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 [Func="Document::IsWebAnimationsGetAnimationsEnabled",
- HeaderFile="nsTransitionManager.h"]
+ HeaderFile="nsTransitionManager.h",
+ Exposed=Window]
 interface CSSTransition : Animation {
   [Constant] readonly attribute DOMString transitionProperty;
 };
--- a/dom/webidl/CanvasCaptureMediaStream.webidl
+++ b/dom/webidl/CanvasCaptureMediaStream.webidl
@@ -5,13 +5,14 @@
  *
  * The origin of this IDL file is
  * https://w3c.github.io/mediacapture-fromelement/index.html
  *
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  * W3C liability, trademark and document use rules apply.
  */
 
-[Pref="canvas.capturestream.enabled"]
+[Pref="canvas.capturestream.enabled",
+ Exposed=Window]
 interface CanvasCaptureMediaStream : MediaStream {
     readonly attribute HTMLCanvasElement canvas;
     void requestFrame();
 };
--- a/dom/webidl/CanvasRenderingContext2D.webidl
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -29,16 +29,17 @@ dictionary HitRegionOptions {
 typedef (HTMLImageElement or
          SVGImageElement) HTMLOrSVGImageElement;
 
 typedef (HTMLOrSVGImageElement or
          HTMLCanvasElement or
          HTMLVideoElement or
          ImageBitmap) CanvasImageSource;
 
+[Exposed=Window]
 interface CanvasRenderingContext2D {
 
   // back-reference to the canvas.  Might be null if we're not
   // associated with a canvas.
   readonly attribute HTMLCanvasElement? canvas;
 
   // Mozilla-specific stuff
   // FIXME Bug 768048 mozCurrentTransform/mozCurrentTransformInverse should return a WebIDL array.
@@ -327,32 +328,35 @@ interface mixin CanvasPathMethods {
 
 interface mixin CanvasHitRegions {
   // hit regions
   [Pref="canvas.hitregions.enabled", Throws] void addHitRegion(optional HitRegionOptions options = {});
   [Pref="canvas.hitregions.enabled"] void removeHitRegion(DOMString id);
   [Pref="canvas.hitregions.enabled"] void clearHitRegions();
 };
 
+[Exposed=Window]
 interface CanvasGradient {
   // opaque object
   [Throws]
   // addColorStop should take a double
   void addColorStop(float offset, DOMString color);
 };
 
+[Exposed=Window]
 interface CanvasPattern {
   // opaque object
   // [Throws, LenientFloat] - could not do this overload because of bug 1020975
   // void setTransform(double a, double b, double c, double d, double e, double f);
 
   // No throw necessary here - SVGMatrix is always good.
   void setTransform(SVGMatrix matrix);
 };
 
+[Exposed=Window]
 interface TextMetrics {
 
   // x-direction
   readonly attribute double width; // advance width
 
   /*
    * NOT IMPLEMENTED YET
 
@@ -368,17 +372,18 @@ interface TextMetrics {
   readonly attribute double emHeightDescent;
   readonly attribute double hangingBaseline;
   readonly attribute double alphabeticBaseline;
   readonly attribute double ideographicBaseline;
   */
 
 };
 
-[Pref="canvas.path.enabled"]
+[Pref="canvas.path.enabled",
+ Exposed=Window]
 interface Path2D
 {
   constructor();
   constructor(Path2D other);
   constructor(DOMString pathString);
 
   [Throws] void addPath(Path2D path, optional DOMMatrix2DInit transform = {});
 };
--- a/dom/webidl/CaretPosition.webidl
+++ b/dom/webidl/CaretPosition.webidl
@@ -1,12 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+[Exposed=Window]
 interface CaretPosition {
 
   /**
    * The offsetNode could potentially be null due to anonymous content.
    */
   readonly attribute Node? offsetNode;
   readonly attribute unsigned long offset;
 
--- a/dom/webidl/CaretStateChangedEvent.webidl
+++ b/dom/webidl/CaretStateChangedEvent.webidl
@@ -20,17 +20,18 @@ dictionary CaretStateChangedEventInit : 
   CaretChangedReason reason = "visibilitychange";
   boolean caretVisible = false;
   boolean caretVisuallyVisible = false;
   boolean selectionVisible = false;
   boolean selectionEditable = false;
   DOMString selectedTextContent = "";
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface CaretStateChangedEvent : Event {
   constructor(DOMString type,
               optional CaretStateChangedEventInit eventInit = {});
 
   readonly attribute boolean collapsed;
   /* The bounding client rect is relative to the visual viewport. */
   readonly attribute DOMRectReadOnly? boundingClientRect;
   readonly attribute CaretChangedReason reason;
--- a/dom/webidl/ChannelMergerNode.webidl
+++ b/dom/webidl/ChannelMergerNode.webidl
@@ -9,14 +9,15 @@
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 dictionary ChannelMergerOptions : AudioNodeOptions {
              unsigned long numberOfInputs = 6;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface ChannelMergerNode : AudioNode {
   [Throws]
   constructor(BaseAudioContext context,
               optional ChannelMergerOptions options = {});
 };
--- a/dom/webidl/ChannelSplitterNode.webidl
+++ b/dom/webidl/ChannelSplitterNode.webidl
@@ -9,15 +9,16 @@
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 dictionary ChannelSplitterOptions : AudioNodeOptions {
              unsigned long numberOfOutputs = 6;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface ChannelSplitterNode : AudioNode {
   [Throws]
   constructor(BaseAudioContext context,
               optional ChannelSplitterOptions options = {});
 };
 
--- a/dom/webidl/CharacterData.webidl
+++ b/dom/webidl/CharacterData.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * http://dom.spec.whatwg.org/#characterdata
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface CharacterData : Node {
   [Pure, SetterThrows]
   attribute [TreatNullAs=EmptyString] DOMString data;
   [Pure]
   readonly attribute unsigned long length;
   [Throws]
   DOMString substringData(unsigned long offset, unsigned long count);
   [Throws]
--- a/dom/webidl/CheckerboardReportService.webidl
+++ b/dom/webidl/CheckerboardReportService.webidl
@@ -23,17 +23,18 @@ dictionary CheckerboardReport {
   unsigned long severity;
   DOMTimeStamp timestamp; // milliseconds since epoch
   DOMString log;
   CheckerboardReason reason;
 };
 
 // The guard function only allows creation of this interface on the
 // about:checkerboard page, and only if it's in the parent process.
-[Func="mozilla::dom::CheckerboardReportService::IsEnabled"]
+[Func="mozilla::dom::CheckerboardReportService::IsEnabled",
+ Exposed=Window]
 interface CheckerboardReportService {
   constructor();
 
   /**
    * Gets the available checkerboard reports.
    */
   sequence<CheckerboardReport> getReports();
 
--- a/dom/webidl/ChildSHistory.webidl
+++ b/dom/webidl/ChildSHistory.webidl
@@ -5,17 +5,18 @@
  */
 
 interface nsISHistory;
 
 /**
  * The ChildSHistory interface represents the child side of a browsing
  * context's session history.
  */
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface ChildSHistory {
   [Pure]
   readonly attribute long count;
   [Pure]
   readonly attribute long index;
 
   boolean canGo(long aOffset);
   [Throws]
--- a/dom/webidl/ChromeNodeList.webidl
+++ b/dom/webidl/ChromeNodeList.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Func="IsChromeOrXBL"]
+[Func="IsChromeOrXBL",
+ Exposed=Window]
 interface ChromeNodeList : NodeList {
   constructor();
 
   [Throws]
   void append(Node aNode);
   [Throws]
   void remove(Node aNode);
 };
--- a/dom/webidl/Clipboard.webidl
+++ b/dom/webidl/Clipboard.webidl
@@ -17,9 +17,9 @@ interface Clipboard : EventTarget {
   Promise<DataTransfer> read();
   [Func="Clipboard::ReadTextEnabled", Throws, NeedsSubjectPrincipal]
   Promise<DOMString> readText();
 
   [Pref="dom.events.asyncClipboard.dataTransfer", Throws, NeedsSubjectPrincipal]
   Promise<void> write(DataTransfer data);
   [Throws, NeedsSubjectPrincipal]
   Promise<void> writeText(DOMString data);
-};
\ No newline at end of file
+};
--- a/dom/webidl/ClipboardEvent.webidl
+++ b/dom/webidl/ClipboardEvent.webidl
@@ -5,16 +5,17 @@
  *
  * For more information on this interface please see
  * http://dev.w3.org/2006/webapi/clipops/#x5-clipboard-event-interfaces
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface ClipboardEvent : Event
 {
   [Throws]
   constructor(DOMString type, optional ClipboardEventInit eventInitDict = {});
 
   readonly attribute DataTransfer? clipboardData;
 };
 
--- a/dom/webidl/CommandEvent.webidl
+++ b/dom/webidl/CommandEvent.webidl
@@ -1,10 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Func="IsChromeOrXBL"]
+[Func="IsChromeOrXBL",
+ Exposed=Window]
 interface CommandEvent : Event {
   readonly attribute DOMString? command;
 };
--- a/dom/webidl/Comment.webidl
+++ b/dom/webidl/Comment.webidl
@@ -5,12 +5,13 @@
  *
  * The origin of this IDL file is
  * http://dom.spec.whatwg.org/#comment
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface Comment : CharacterData {
   [Throws]
   constructor(optional DOMString data = "");
 };
--- a/dom/webidl/CompositionEvent.webidl
+++ b/dom/webidl/CompositionEvent.webidl
@@ -4,16 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://w3c.github.io/uievents/#interface-compositionevent
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface CompositionEvent : UIEvent
 {
   constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
 
   readonly attribute DOMString? data;
   // locale is currently non-standard
   readonly attribute DOMString  locale;
 
--- a/dom/webidl/ConstantSourceNode.webidl
+++ b/dom/webidl/ConstantSourceNode.webidl
@@ -9,15 +9,16 @@
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 dictionary ConstantSourceOptions {
     float offset = 1;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface ConstantSourceNode :  AudioScheduledSourceNode {
     constructor(BaseAudioContext context,
                 optional ConstantSourceOptions options = {});
 
     readonly        attribute AudioParam   offset;
 };
--- a/dom/webidl/ConvolverNode.webidl
+++ b/dom/webidl/ConvolverNode.webidl
@@ -10,17 +10,18 @@
  * liability, trademark and document use rules apply.
  */
 
 dictionary ConvolverOptions : AudioNodeOptions {
              AudioBuffer? buffer;
              boolean      disableNormalization = false;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface ConvolverNode : AudioNode {
       [Throws]
       constructor(BaseAudioContext context, optional
                   ConvolverOptions options = {});
 
       [SetterThrows]
       attribute AudioBuffer? buffer;
       attribute boolean normalize;
--- a/dom/webidl/Coordinates.webidl
+++ b/dom/webidl/Coordinates.webidl
@@ -5,17 +5,18 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/geolocation-API
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface Coordinates {
   readonly attribute double latitude;
   readonly attribute double longitude;
   readonly attribute double? altitude;
   readonly attribute double accuracy;
   readonly attribute double? altitudeAccuracy;
   readonly attribute double? heading;
   readonly attribute double? speed;
--- a/dom/webidl/CreateOfferRequest.webidl
+++ b/dom/webidl/CreateOfferRequest.webidl
@@ -2,15 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * This is an internal IDL file
  */
 
 [ChromeOnly,
- JSImplementation="@mozilla.org/dom/createofferrequest;1"]
+ JSImplementation="@mozilla.org/dom/createofferrequest;1",
+ Exposed=Window]
 interface CreateOfferRequest {
   readonly attribute unsigned long long windowID;
   readonly attribute unsigned long long innerWindowID;
   readonly attribute DOMString callID;
   readonly attribute boolean isSecure;
 };
--- a/dom/webidl/CustomElementRegistry.webidl
+++ b/dom/webidl/CustomElementRegistry.webidl
@@ -1,13 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // https://html.spec.whatwg.org/#dom-window-customelements
+[Exposed=Window]
 interface CustomElementRegistry {
   [CEReactions, Throws, UseCounter]
   void define(DOMString name, CustomElementConstructor constructor,
               optional ElementDefinitionOptions options = {});
   [ChromeOnly, Throws]
   void setElementCreationCallback(DOMString name, CustomElementCreationCallback callback);
   any get(DOMString name);
   [Throws]
--- a/dom/webidl/DOMImplementation.webidl
+++ b/dom/webidl/DOMImplementation.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://dom.spec.whatwg.org/#interface-domimplementation
  *
  * Copyright:
  * To the extent possible under law, the editors have waived all copyright and
  * related or neighboring rights to this work.
  */
 
+[Exposed=Window]
 interface DOMImplementation {
   boolean hasFeature();
 
   [Throws]
   DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
                                   DOMString systemId);
   [Throws]
   Document createDocument(DOMString? namespace,
--- a/dom/webidl/DOMParser.webidl
+++ b/dom/webidl/DOMParser.webidl
@@ -13,16 +13,17 @@ interface InputStream;
 enum SupportedType {
   "text/html",
   "text/xml",
   "application/xml",
   "application/xhtml+xml",
   "image/svg+xml"
 };
 
+[Exposed=Window]
 interface DOMParser {
   [Throws]
   constructor();
 
   [NewObject, Throws]
   Document parseFromString(DOMString str, SupportedType type);
 
   [NewObject, ChromeOnly, Throws]
--- a/dom/webidl/DOMRectList.webidl
+++ b/dom/webidl/DOMRectList.webidl
@@ -1,10 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+[Exposed=Window]
 interface DOMRectList {
   readonly attribute unsigned long length;
   getter DOMRect? item(unsigned long index);
 };
--- a/dom/webidl/DOMStringMap.webidl
+++ b/dom/webidl/DOMStringMap.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#domstringmap-0
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[OverrideBuiltins]
+[OverrideBuiltins,
+ Exposed=Window]
 interface DOMStringMap {
   getter DOMString (DOMString name);
   [CEReactions, Throws]
   setter void (DOMString name, DOMString value);
   [CEReactions]
   deleter void (DOMString name);
 };
--- a/dom/webidl/DOMTokenList.webidl
+++ b/dom/webidl/DOMTokenList.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120105/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface DOMTokenList {
   readonly attribute unsigned long length;
   getter DOMString? item(unsigned long index);
   boolean contains(DOMString token);
   [CEReactions, Throws]
   void add(DOMString... tokens);
   [CEReactions, Throws]
   void remove(DOMString... tokens);
--- a/dom/webidl/DataTransfer.webidl
+++ b/dom/webidl/DataTransfer.webidl
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface
  */
 interface ContentSecurityPolicy;
 
+[Exposed=Window]
 interface DataTransfer {
   constructor();
 
            attribute DOMString dropEffect;
            attribute DOMString effectAllowed;
 
   readonly attribute DataTransferItemList items;
 
--- a/dom/webidl/DataTransferItem.webidl
+++ b/dom/webidl/DataTransferItem.webidl
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitem-interface
  * https://wicg.github.io/entries-api/#idl-index
  */
 
+[Exposed=Window]
 interface DataTransferItem {
   readonly attribute DOMString kind;
   readonly attribute DOMString type;
   [Throws, NeedsSubjectPrincipal]
   void getAsString(FunctionStringCallback? callback);
   [Throws, NeedsSubjectPrincipal]
   File? getAsFile();
 };
--- a/dom/webidl/DataTransferItemList.webidl
+++ b/dom/webidl/DataTransferItemList.webidl
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitemlist-interface
  */
 
+[Exposed=Window]
 interface DataTransferItemList {
   readonly attribute unsigned long length;
   getter DataTransferItem (unsigned long index);
   [Throws, NeedsSubjectPrincipal]
   DataTransferItem? add(DOMString data, DOMString type);
   [Throws, NeedsSubjectPrincipal]
   DataTransferItem? add(File data);
   [Throws, NeedsSubjectPrincipal]
--- a/dom/webidl/DelayNode.webidl
+++ b/dom/webidl/DelayNode.webidl
@@ -10,17 +10,18 @@
  * liability, trademark and document use rules apply.
  */
 
 dictionary DelayOptions : AudioNodeOptions {
              double maxDelayTime = 1;
              double delayTime = 0;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface DelayNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context, optional DelayOptions options = {});
 
     readonly attribute AudioParam delayTime;
 
 };
 
--- a/dom/webidl/DeviceLightEvent.webidl
+++ b/dom/webidl/DeviceLightEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="device.sensors.ambientLight.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled"]
+[Pref="device.sensors.ambientLight.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
+ Exposed=Window]
 interface DeviceLightEvent : Event
 {
   constructor(DOMString type, optional DeviceLightEventInit eventInitDict = {});
 
   readonly attribute unrestricted double value;
 };
 
 dictionary DeviceLightEventInit : EventInit
--- a/dom/webidl/DeviceMotionEvent.webidl
+++ b/dom/webidl/DeviceMotionEvent.webidl
@@ -1,31 +1,34 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://w3c.github.io/deviceorientation/
  */
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+  Exposed=Window]
 interface DeviceAcceleration {
   readonly attribute double? x;
   readonly attribute double? y;
   readonly attribute double? z;
 };
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface DeviceRotationRate {
   readonly attribute double? alpha;
   readonly attribute double? beta;
   readonly attribute double? gamma;
 };
 
-[Pref="device.sensors.motion.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled"]
+[Pref="device.sensors.motion.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
+ Exposed=Window]
 interface DeviceMotionEvent : Event {
   constructor(DOMString type,
               optional DeviceMotionEventInit eventInitDict = {});
 
   readonly attribute DeviceAcceleration? acceleration;
   readonly attribute DeviceAcceleration? accelerationIncludingGravity;
   readonly attribute DeviceRotationRate? rotationRate;
   readonly attribute double? interval;
--- a/dom/webidl/DeviceOrientationEvent.webidl
+++ b/dom/webidl/DeviceOrientationEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit]
+[Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit,
+ Exposed=Window]
 interface DeviceOrientationEvent : Event
 {
   constructor(DOMString type,
               optional DeviceOrientationEventInit eventInitDict = {});
 
   readonly attribute double? alpha;
   readonly attribute double? beta;
   readonly attribute double? gamma;
--- a/dom/webidl/DeviceProximityEvent.webidl
+++ b/dom/webidl/DeviceProximityEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="device.sensors.proximity.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled"]
+[Pref="device.sensors.proximity.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
+ Exposed=Window]
 interface DeviceProximityEvent : Event
 {
   constructor(DOMString type,
               optional DeviceProximityEventInit eventInitDict = {});
 
   readonly attribute double value;
   readonly attribute double min;
   readonly attribute double max;
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -31,16 +31,17 @@ enum VisibilityState { "hidden", "visibl
 dictionary ElementCreationOptions {
   DOMString is;
 
   [ChromeOnly]
   DOMString pseudo;
 };
 
 /* https://dom.spec.whatwg.org/#interface-document */
+[Exposed=Window]
 interface Document : Node {
   [Throws]
   constructor();
 
   [Throws]
   readonly attribute DOMImplementation implementation;
   [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
   readonly attribute DOMString URL;
--- a/dom/webidl/DocumentFragment.webidl
+++ b/dom/webidl/DocumentFragment.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120405/#interface-documentfragment
  * http://www.w3.org/TR/2012/WD-selectors-api-20120628/#interface-definitions
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface DocumentFragment : Node {
   [Throws]
   constructor();
 
   Element? getElementById(DOMString elementId);
 };
 
 // http://www.w3.org/TR/2012/WD-selectors-api-20120628/#interface-definitions
--- a/dom/webidl/DocumentTimeline.webidl
+++ b/dom/webidl/DocumentTimeline.webidl
@@ -9,13 +9,14 @@
  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 dictionary DocumentTimelineOptions {
   DOMHighResTimeStamp originTime = 0;
 };
 
-[Func="Document::AreWebAnimationsTimelinesEnabled"]
+[Func="Document::AreWebAnimationsTimelinesEnabled",
+ Exposed=Window]
 interface DocumentTimeline : AnimationTimeline {
   [Throws]
   constructor(optional DocumentTimelineOptions options = {});
 };
--- a/dom/webidl/DocumentType.webidl
+++ b/dom/webidl/DocumentType.webidl
@@ -5,15 +5,16 @@
  *
  * The origin of this IDL file is
  * http://dom.spec.whatwg.org/#documenttype
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface DocumentType : Node {
   readonly attribute DOMString name;
   readonly attribute DOMString publicId;
   readonly attribute DOMString systemId;
 };
 
 DocumentType includes ChildNode;
--- a/dom/webidl/DragEvent.webidl
+++ b/dom/webidl/DragEvent.webidl
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://html.spec.whatwg.org/multipage/#dragevent
  */
 
+[Exposed=Window]
 interface DragEvent : MouseEvent
 {
   constructor(DOMString type, optional DragEventInit eventInitDict = {});
 
   readonly attribute DataTransfer? dataTransfer;
 
   void initDragEvent(DOMString type,
                      optional boolean canBubble = false,
--- a/dom/webidl/DynamicsCompressorNode.webidl
+++ b/dom/webidl/DynamicsCompressorNode.webidl
@@ -13,17 +13,18 @@
 dictionary DynamicsCompressorOptions : AudioNodeOptions {
              float attack = 0.003;
              float knee = 30;
              float ratio = 12;
              float release = 0.25;
              float threshold = -24;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface DynamicsCompressorNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context,
                 optional DynamicsCompressorOptions options = {});
 
     readonly attribute AudioParam threshold; // in Decibels
     readonly attribute AudioParam knee; // in Decibels
     readonly attribute AudioParam ratio; // unit-less
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -8,16 +8,17 @@
  * http://domparsing.spec.whatwg.org/ and
  * http://dev.w3.org/csswg/cssom-view/ and
  * http://www.w3.org/TR/selectors-api/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface Element : Node {
   [Constant]
   readonly attribute DOMString? namespaceURI;
   [Constant]
   readonly attribute DOMString? prefix;
   [Constant]
   readonly attribute DOMString localName;
 
--- a/dom/webidl/EventListener.webidl
+++ b/dom/webidl/EventListener.webidl
@@ -5,11 +5,12 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120105/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 callback interface EventListener {
   void handleEvent(Event event);
 };
--- a/dom/webidl/External.webidl
+++ b/dom/webidl/External.webidl
@@ -1,13 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[NoInterfaceObject, JSImplementation="@mozilla.org/sidebar;1"]
+[NoInterfaceObject, JSImplementation="@mozilla.org/sidebar;1",
+ Exposed=Window]
 interface External
 {
   [Deprecated="External_AddSearchProvider"]
   void AddSearchProvider(DOMString aDescriptionURL);
   void IsSearchProviderInstalled();
 };
--- a/dom/webidl/FeaturePolicy.webidl
+++ b/dom/webidl/FeaturePolicy.webidl
@@ -2,24 +2,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * For more information on this interface, please see
  * https://w3c.github.io/webappsec-feature-policy/#idl-index
  */
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface FeaturePolicy {
   boolean allowsFeature(DOMString feature, optional DOMString origin);
   sequence<DOMString> features();
   sequence<DOMString> allowedFeatures();
   sequence<DOMString> getAllowlistForFeature(DOMString feature);
 };
 
-[Pref="dom.reporting.featurePolicy.enabled"]
+[Pref="dom.reporting.featurePolicy.enabled",
+ Exposed=Window]
 interface FeaturePolicyViolationReportBody : ReportBody {
   readonly attribute DOMString featureId;
   readonly attribute DOMString? sourceFile;
   readonly attribute long? lineNumber;
   readonly attribute long? columnNumber;
   readonly attribute DOMString disposition;
 };
--- a/dom/webidl/FetchObserver.webidl
+++ b/dom/webidl/FetchObserver.webidl
@@ -1,14 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+[Exposed=Window]
 callback interface ObserverCallback {
   void handleEvent(FetchObserver observer);
 };
 
 enum FetchState {
   // Pending states
   "requesting", "responding",
   // Final states
--- a/dom/webidl/FileSystem.webidl
+++ b/dom/webidl/FileSystem.webidl
@@ -10,12 +10,13 @@ dictionary FileSystemFlags {
     boolean create = false;
     boolean exclusive = false;
 };
 
 callback FileSystemEntryCallback = void (FileSystemEntry entry);
 
 callback ErrorCallback = void (DOMException err);
 
+[Exposed=Window]
 interface FileSystem {
     readonly    attribute USVString name;
     readonly    attribute FileSystemDirectoryEntry root;
 };
--- a/dom/webidl/FileSystemDirectoryEntry.webidl
+++ b/dom/webidl/FileSystemDirectoryEntry.webidl
@@ -1,16 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://wicg.github.io/entries-api/#idl-index
  */
 
+[Exposed=Window]
 interface FileSystemDirectoryEntry : FileSystemEntry {
     FileSystemDirectoryReader createReader();
 
     void getFile(optional USVString? path,
                  optional FileSystemFlags options = {},
                  optional FileSystemEntryCallback successCallback,
                  optional ErrorCallback errorCallback);
 
--- a/dom/webidl/FileSystemDirectoryReader.webidl
+++ b/dom/webidl/FileSystemDirectoryReader.webidl
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://wicg.github.io/entries-api/#idl-index
  */
 
 callback FileSystemEntriesCallback = void (sequence<FileSystemEntry> entries);
 
+[Exposed=Window]
 interface FileSystemDirectoryReader {
 
     // readEntries can be called just once. The second time it returns no data.
 
     [Throws]
     void readEntries(FileSystemEntriesCallback successCallback,
                      optional ErrorCallback errorCallback);
 };
--- a/dom/webidl/FileSystemEntry.webidl
+++ b/dom/webidl/FileSystemEntry.webidl
@@ -1,16 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://wicg.github.io/entries-api/#idl-index
  */
 
+[Exposed=Window]
 interface FileSystemEntry {
     readonly attribute boolean isFile;
     readonly attribute boolean isDirectory;
 
     [GetterThrows]
     readonly attribute USVString name;
 
     [GetterThrows]
--- a/dom/webidl/FileSystemFileEntry.webidl
+++ b/dom/webidl/FileSystemFileEntry.webidl
@@ -3,13 +3,14 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://wicg.github.io/entries-api/#idl-index
  */
 
 callback FileCallback = void (File file);
 
+[Exposed=Window]
 interface FileSystemFileEntry : FileSystemEntry {
     [BinaryName="GetFile"]
     void file (FileCallback successCallback,
                optional ErrorCallback errorCallback);
 };
--- a/dom/webidl/FocusEvent.webidl
+++ b/dom/webidl/FocusEvent.webidl
@@ -5,16 +5,17 @@
  *
  * For more information on this interface please see
  * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface FocusEvent : UIEvent {
   constructor(DOMString typeArg,
               optional FocusEventInit focusEventInitDict = {});
 
   // Introduced in DOM Level 3:
   readonly attribute EventTarget?   relatedTarget;
 };
 
--- a/dom/webidl/FontFace.webidl
+++ b/dom/webidl/FontFace.webidl
@@ -22,17 +22,18 @@ dictionary FontFaceDescriptors {
   DOMString variationSettings = "normal";
   DOMString display = "auto";
 };
 
 enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
 
 // Bug 1072107 is for exposing this in workers.
 // [Exposed=(Window,Worker)]
-[Pref="layout.css.font-loading-api.enabled"]
+[Pref="layout.css.font-loading-api.enabled",
+ Exposed=Window]
 interface FontFace {
   [Throws]
   constructor(DOMString family,
               (DOMString or BinaryData) source,
               optional FontFaceDescriptors descriptors = {});
 
   [SetterThrows] attribute DOMString family;
   [SetterThrows] attribute DOMString style;
--- a/dom/webidl/FontFaceSet.webidl
+++ b/dom/webidl/FontFaceSet.webidl
@@ -13,26 +13,28 @@
 // To implement FontFaceSet's iterator until we can use setlike.
 dictionary FontFaceSetIteratorResult
 {
   required any value;
   required boolean done;
 };
 
 // To implement FontFaceSet's iterator until we can use setlike.
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface FontFaceSetIterator {
   [Throws] FontFaceSetIteratorResult next();
 };
 
 callback FontFaceSetForEachCallback = void (FontFace value, FontFace key, FontFaceSet set);
 
 enum FontFaceSetLoadStatus { "loading", "loaded" };
 
-[Pref="layout.css.font-loading-api.enabled"]
+[Pref="layout.css.font-loading-api.enabled",
+ Exposed=Window]
 interface FontFaceSet : EventTarget {
   // Bug 1072762 is for the FontFaceSet constructor.
   // constructor(sequence<FontFace> initialFaces);
 
   // Emulate setlike behavior until we can use that directly.
   readonly attribute unsigned long size;
   [Throws] void add(FontFace font);
   boolean has(FontFace font);
--- a/dom/webidl/FontFaceSetLoadEvent.webidl
+++ b/dom/webidl/FontFaceSetLoadEvent.webidl
@@ -9,15 +9,16 @@
  * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 dictionary FontFaceSetLoadEventInit : EventInit {
   sequence<FontFace> fontfaces = [];
 };
 
-[Pref="layout.css.font-loading-api.enabled"]
+[Pref="layout.css.font-loading-api.enabled",
+ Exposed=Window]
 interface FontFaceSetLoadEvent : Event {
   constructor(DOMString type,
               optional FontFaceSetLoadEventInit eventInitDict = {});
 
   [Cached, Constant, Frozen] readonly attribute sequence<FontFace> fontfaces;
 };
--- a/dom/webidl/FrameCrashedEvent.webidl
+++ b/dom/webidl/FrameCrashedEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface FrameCrashedEvent : Event
 {
   constructor(DOMString type,
               optional FrameCrashedEventInit eventInitDict = {});
 
   /**
    * The browsingContextId of the frame that crashed.
    */
--- a/dom/webidl/FrameLoader.webidl
+++ b/dom/webidl/FrameLoader.webidl
@@ -7,17 +7,18 @@
 interface LoadContext;
 interface RemoteTab;
 interface URI;
 interface nsIDocShell;
 interface nsIPrintSettings;
 interface nsIWebBrowserPersistDocumentReceiver;
 interface nsIWebProgressListener;
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface FrameLoader {
   /**
    * Get the docshell from the frame loader.
    */
   [GetterThrows]
   readonly attribute nsIDocShell? docShell;
 
   /**
--- a/dom/webidl/FuzzingFunctions.webidl
+++ b/dom/webidl/FuzzingFunctions.webidl
@@ -5,17 +5,18 @@
  */
 
 /*
  * Various functions useful for automated fuzzing that are enabled
  * only in --enable-fuzzing builds, because they may be dangerous to
  * enable on untrusted pages.
 */
 
-[Pref="fuzzing.enabled"]
+[Pref="fuzzing.enabled",
+ Exposed=Window]
 interface FuzzingFunctions {
   /**
    * Synchronously perform a garbage collection.
    */
   static void garbageCollect();
 
   /**
    * Synchronously perform a cycle collection.
--- a/dom/webidl/GainNode.webidl
+++ b/dom/webidl/GainNode.webidl
@@ -9,17 +9,18 @@
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 dictionary GainOptions : AudioNodeOptions {
              float gain = 1.0;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface GainNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context, optional GainOptions options = {});
 
     readonly attribute AudioParam gain;
 
 };
 
--- a/dom/webidl/Gamepad.webidl
+++ b/dom/webidl/Gamepad.webidl
@@ -4,17 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://w3c.github.io/gamepad/
  * https://w3c.github.io/gamepad/extensions.html
  * https://w3c.github.io/webvr/spec/1.1/#interface-gamepad
  */
 
-[Pref="dom.gamepad.enabled"]
+[Pref="dom.gamepad.enabled",
+ Exposed=Window]
 interface GamepadButton {
   readonly    attribute boolean pressed;
   readonly    attribute boolean touched;
   readonly    attribute double  value;
 };
 
 enum GamepadHand {
   "",
@@ -22,17 +23,18 @@ enum GamepadHand {
   "right"
 };
 
 enum GamepadMappingType {
   "",
   "standard"
 };
 
-[Pref="dom.gamepad.enabled"]
+[Pref="dom.gamepad.enabled",
+ Exposed=Window]
 interface Gamepad {
   /**
    * An identifier, unique per type of device.
    */
   readonly attribute DOMString id;
 
   /**
    * The game port index for the device. Unique per device
--- a/dom/webidl/GamepadAxisMoveEvent.webidl
+++ b/dom/webidl/GamepadAxisMoveEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="dom.gamepad.non_standard_events.enabled"]
+[Pref="dom.gamepad.non_standard_events.enabled",
+ Exposed=Window]
 interface GamepadAxisMoveEvent : GamepadEvent
 {
   constructor(DOMString type,
               optional GamepadAxisMoveEventInit eventInitDict = {});
 
   readonly attribute unsigned long axis;
   readonly attribute double value;
 };
--- a/dom/webidl/GamepadButtonEvent.webidl
+++ b/dom/webidl/GamepadButtonEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="dom.gamepad.non_standard_events.enabled"]
+[Pref="dom.gamepad.non_standard_events.enabled",
+ Exposed=Window]
 interface GamepadButtonEvent : GamepadEvent
 {
   constructor(DOMString type,
               optional GamepadButtonEventInit eventInitDict = {});
 
   readonly attribute unsigned long button;
 };
 
--- a/dom/webidl/GamepadEvent.webidl
+++ b/dom/webidl/GamepadEvent.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://w3c.github.io/gamepad/#gamepadevent-interface
  */
 
-[Pref="dom.gamepad.enabled"]
+[Pref="dom.gamepad.enabled",
+ Exposed=Window]
 interface GamepadEvent : Event
 {
   constructor(DOMString type, optional GamepadEventInit eventInitDict = {});
 
   readonly attribute Gamepad? gamepad;
 };
 
 dictionary GamepadEventInit : EventInit
--- a/dom/webidl/GamepadHapticActuator.webidl
+++ b/dom/webidl/GamepadHapticActuator.webidl
@@ -7,15 +7,16 @@
  * https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuator-interface
  */
 
 enum GamepadHapticActuatorType {
   "vibration"
 };
 
 [Pref="dom.gamepad.extensions.enabled",
-  HeaderFile="mozilla/dom/GamepadHapticActuator.h"]
+ HeaderFile="mozilla/dom/GamepadHapticActuator.h",
+ Exposed=Window]
 interface GamepadHapticActuator
 {
   readonly attribute GamepadHapticActuatorType type;
   [Throws, NewObject]
   Promise<boolean> pulse(double value, double duration);
 };
--- a/dom/webidl/GamepadLightIndicator.webidl
+++ b/dom/webidl/GamepadLightIndicator.webidl
@@ -13,15 +13,16 @@ enum GamepadLightIndicatorType {
 };
 
 dictionary GamepadLightColor {
   required octet red;
   required octet green;
   required octet blue;
 };
 
-[SecureContext, Pref="dom.gamepad.extensions.lightindicator"]
+[SecureContext, Pref="dom.gamepad.extensions.lightindicator",
+ Exposed=Window]
 interface GamepadLightIndicator
 {
   readonly attribute GamepadLightIndicatorType type;
   [Throws, NewObject]
   Promise<boolean> setColor(GamepadLightColor color);
 };
--- a/dom/webidl/GamepadPose.webidl
+++ b/dom/webidl/GamepadPose.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface
  */
 
-[Pref="dom.gamepad.extensions.enabled"]
+[Pref="dom.gamepad.extensions.enabled",
+ Exposed=Window]
 interface GamepadPose
 {
   readonly attribute boolean hasOrientation;
   readonly attribute boolean hasPosition;
 
   /**
    * position, linearVelocity, and linearAcceleration are 3-component vectors.
    * position is relative to a sitting space. Transforming this point with
--- a/dom/webidl/GamepadServiceTest.webidl
+++ b/dom/webidl/GamepadServiceTest.webidl
@@ -1,13 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[Pref="dom.gamepad.test.enabled"]
+[Pref="dom.gamepad.test.enabled",
+ Exposed=Window]
 interface GamepadServiceTest
 {
   readonly attribute GamepadMappingType noMapping;
   readonly attribute GamepadMappingType standardMapping;
   readonly attribute GamepadHand noHand;
   readonly attribute GamepadHand leftHand;
   readonly attribute GamepadHand rightHand;
 
--- a/dom/webidl/GamepadTouch.webidl
+++ b/dom/webidl/GamepadTouch.webidl
@@ -2,15 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://github.com/knyg/gamepad/blob/multitouch/extensions.html
  */
 
-[SecureContext, Pref="dom.gamepad.extensions.multitouch"]
+[SecureContext, Pref="dom.gamepad.extensions.multitouch",
+ Exposed=Window]
 interface GamepadTouch {
   readonly attribute unsigned long touchId;
   readonly attribute octet surfaceId;
   [Constant, Throws] readonly attribute Float32Array position;
   [Constant, Throws] readonly attribute Uint32Array? surfaceDimensions;
 };
--- a/dom/webidl/Geolocation.webidl
+++ b/dom/webidl/Geolocation.webidl
@@ -11,17 +11,18 @@
  */
 
 dictionary PositionOptions {
   boolean enableHighAccuracy = false;
   [Clamp] unsigned long timeout = 0x7fffffff;
   [Clamp] unsigned long maximumAge = 0;
 };
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface Geolocation {
   [Throws, NeedsCallerType]
   void getCurrentPosition(PositionCallback successCallback,
                           optional PositionErrorCallback? errorCallback = null,
                           optional PositionOptions options = {});
 
   [Throws, NeedsCallerType]
   long watchPosition(PositionCallback successCallback,
--- a/dom/webidl/GetUserMediaRequest.webidl
+++ b/dom/webidl/GetUserMediaRequest.webidl
@@ -8,17 +8,18 @@
 
 // for gUM request start (getUserMedia:request) notification,
 // rawID and mediaSource won't be set.
 // for gUM request stop (recording-device-stopped) notification due to page reload,
 // only windowID will be set.
 // for gUM request stop (recording-device-stopped) notification due to track stop,
 // only windowID, rawID and mediaSource will be set
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface GetUserMediaRequest {
   readonly attribute unsigned long long windowID;
   readonly attribute unsigned long long innerWindowID;
   readonly attribute DOMString callID;
   readonly attribute DOMString rawID;
   readonly attribute DOMString mediaSource;
   MediaStreamConstraints getConstraints();
   readonly attribute boolean isSecure;
--- a/dom/webidl/Grid.webidl
+++ b/dom/webidl/Grid.webidl
@@ -14,45 +14,49 @@
 enum GridDeclaration { "explicit", "implicit" };
 
 /**
  * Tracks expanded from auto-fill are repeat , auto-fits with elements are
  * also repeat, auto-fits with no elements are removed, other tracks are static.
  */
 enum GridTrackState { "static", "repeat", "removed" };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface Grid
 {
   readonly attribute GridDimension rows;
   readonly attribute GridDimension cols;
   [Cached, Constant]
   readonly attribute sequence<GridArea> areas;
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface GridDimension
 {
   readonly attribute GridLines lines;
   readonly attribute GridTracks tracks;
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface GridLines
 {
   readonly attribute unsigned long length;
 
   /**
    * This accessor method allows array-like access to lines.
    * @param index A 0-indexed value.
    */
   getter GridLine? item(unsigned long index);
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface GridLine
 {
   /**
    * Names include both explicit names and implicit names, which will be
    * assigned if the line contributes to a named area.
    * https://drafts.csswg.org/css-grid/#implicit-named-lines
    */
   [Cached, Constant]
@@ -85,38 +89,41 @@ interface GridLine
    * negativeNumbers decrement by 1 for each line before that.
    * Lines after the last explicit line have negativeNumber 0, which
    * is not a valid addressable line number, and should be filtered
    * out by callers.
    */
   readonly attribute long negativeNumber;
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface GridTracks
 {
   readonly attribute unsigned long length;
 
   /**
    * This accessor method allows array-like access to tracks.
    * @param index A 0-indexed value.
    */
   getter GridTrack? item(unsigned long index);
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface GridTrack
 {
   readonly attribute double start;
   readonly attribute double breadth;
   readonly attribute GridDeclaration type;
   readonly attribute GridTrackState state;
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface GridArea
 {
   readonly attribute DOMString name;
   readonly attribute GridDeclaration type;
 
   /**
    * These values are 1-indexed line numbers bounding the area.
    */
--- a/dom/webidl/HTMLAllCollection.webidl
+++ b/dom/webidl/HTMLAllCollection.webidl
@@ -1,13 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Emulates undefined through Codegen.py. */
-[LegacyUnenumerableNamedProperties]
+[LegacyUnenumerableNamedProperties,
+ Exposed=Window]
 interface HTMLAllCollection {
   readonly attribute unsigned long length;
   getter Element (unsigned long index);
   getter (HTMLCollection or Element)? namedItem(DOMString name);
   (HTMLCollection or Element)? item(optional DOMString nameOrIndex);
   legacycaller (HTMLCollection or Element)? (optional DOMString nameOrIndex);
 };
--- a/dom/webidl/HTMLAnchorElement.webidl
+++ b/dom/webidl/HTMLAnchorElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLAnchorElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString target;
            [CEReactions, SetterThrows]
            attribute DOMString download;
            [CEReactions, SetterThrows]
            attribute DOMString ping;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLAreaElement.webidl
+++ b/dom/webidl/HTMLAreaElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  &
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLAreaElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString alt;
            [CEReactions, SetterThrows]
            attribute DOMString coords;
            [CEReactions, SetterThrows]
            attribute DOMString shape;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLAudioElement.webidl
+++ b/dom/webidl/HTMLAudioElement.webidl
@@ -6,11 +6,12 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-audio-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor, NamedConstructor=Audio(optional DOMString src)]
+[HTMLConstructor, NamedConstructor=Audio(optional DOMString src),
+ Exposed=Window]
 interface HTMLAudioElement : HTMLMediaElement {};
 
--- a/dom/webidl/HTMLBRElement.webidl
+++ b/dom/webidl/HTMLBRElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLBRElement : HTMLElement {};
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLBRElement {
              [CEReactions, SetterThrows]
              attribute DOMString clear;
 };
 
--- a/dom/webidl/HTMLBaseElement.webidl
+++ b/dom/webidl/HTMLBaseElement.webidl
@@ -7,16 +7,17 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLBaseElement : HTMLElement {
            [CEReactions, SetterThrows, Pure]
            attribute DOMString href;
            [CEReactions, SetterThrows, Pure]
            attribute DOMString target;
 };
 
--- a/dom/webidl/HTMLBodyElement.webidl
+++ b/dom/webidl/HTMLBodyElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLBodyElement : HTMLElement {
 };
 
 partial interface HTMLBodyElement {
   [CEReactions, SetterThrows]
   attribute [TreatNullAs=EmptyString] DOMString text;
   [CEReactions, SetterThrows]
   attribute [TreatNullAs=EmptyString] DOMString link;
--- a/dom/webidl/HTMLButtonElement.webidl
+++ b/dom/webidl/HTMLButtonElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLButtonElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
            attribute boolean autofocus;
   [CEReactions, SetterThrows, Pure]
            attribute boolean disabled;
   [Pure]
   readonly attribute HTMLFormElement? form;
   [CEReactions, SetterThrows, Pure]
--- a/dom/webidl/HTMLCanvasElement.webidl
+++ b/dom/webidl/HTMLCanvasElement.webidl
@@ -8,17 +8,18 @@
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 interface nsISupports;
 interface Variant;
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLCanvasElement : HTMLElement {
   [CEReactions, Pure, SetterThrows]
            attribute unsigned long width;
   [CEReactions, Pure, SetterThrows]
            attribute unsigned long height;
 
   [Throws]
   nsISupports? getContext(DOMString contextId, optional any contextOptions = null);
@@ -51,17 +52,18 @@ partial interface HTMLCanvasElement {
 
 // For OffscreenCanvas
 // Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
 partial interface HTMLCanvasElement {
   [Pref="gfx.offscreencanvas.enabled", Throws]
   OffscreenCanvas transferControlToOffscreen();
 };
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface MozCanvasPrintState
 {
   // A canvas rendering context.
   readonly attribute nsISupports context;
 
   // To be called when rendering to the context is done.
   void done();
 };
--- a/dom/webidl/HTMLCollection.webidl
+++ b/dom/webidl/HTMLCollection.webidl
@@ -5,14 +5,15 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120105/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[LegacyUnenumerableNamedProperties]
+[LegacyUnenumerableNamedProperties,
+ Exposed=Window]
 interface HTMLCollection {
   readonly attribute unsigned long length;
   getter Element? item(unsigned long index);
   getter Element? namedItem(DOMString name);
 };
--- a/dom/webidl/HTMLDListElement.webidl
+++ b/dom/webidl/HTMLDListElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLDListElement : HTMLElement {
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLDListElement {
            [CEReactions, SetterThrows]
            attribute boolean compact;
 };
--- a/dom/webidl/HTMLDataElement.webidl
+++ b/dom/webidl/HTMLDataElement.webidl
@@ -2,13 +2,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLDataElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString value;
 };
--- a/dom/webidl/HTMLDataListElement.webidl
+++ b/dom/webidl/HTMLDataListElement.webidl
@@ -6,12 +6,13 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLDataListElement : HTMLElement {
   readonly attribute HTMLCollection options;
 };
--- a/dom/webidl/HTMLDetailsElement.webidl
+++ b/dom/webidl/HTMLDetailsElement.webidl
@@ -6,13 +6,14 @@
  * The origin of this IDL file is
  * https://html.spec.whatwg.org/multipage/forms.html#the-details-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLDetailsElement : HTMLElement {
   [CEReactions, SetterThrows]
   attribute boolean open;
 };
--- a/dom/webidl/HTMLDialogElement.webidl
+++ b/dom/webidl/HTMLDialogElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[Pref="dom.dialog_element.enabled", HTMLConstructor]
+[Pref="dom.dialog_element.enabled", HTMLConstructor,
+ Exposed=Window]
 interface HTMLDialogElement : HTMLElement {
   [CEReactions, SetterThrows]
   attribute boolean open;
   attribute DOMString returnValue;
   [CEReactions]
   void show();
   [CEReactions, Throws]
   void showModal();
--- a/dom/webidl/HTMLDirectoryElement.webidl
+++ b/dom/webidl/HTMLDirectoryElement.webidl
@@ -7,14 +7,15 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLDirectoryElement : HTMLElement {
            [CEReactions, SetterThrows, Pure]
            attribute boolean compact;
 };
 
--- a/dom/webidl/HTMLDivElement.webidl
+++ b/dom/webidl/HTMLDivElement.webidl
@@ -6,15 +6,16 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLDivElement : HTMLElement {};
 
 partial interface HTMLDivElement {
   [CEReactions, SetterThrows]
            attribute DOMString align;
 };
--- a/dom/webidl/HTMLDocument.webidl
+++ b/dom/webidl/HTMLDocument.webidl
@@ -1,12 +1,13 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[OverrideBuiltins]
+[OverrideBuiltins,
+ Exposed=Window]
 interface HTMLDocument : Document {
   // DOM tree accessors
   [Throws]
   getter object (DOMString name);
 };
--- a/dom/webidl/HTMLElement.webidl
+++ b/dom/webidl/HTMLElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/ and
  * http://dev.w3.org/csswg/cssom-view/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLElement : Element {
   // metadata attributes
   [CEReactions]
            attribute DOMString title;
   [CEReactions]
            attribute DOMString lang;
   //         attribute boolean translate;
   [CEReactions, SetterThrows, Pure]
@@ -81,9 +82,10 @@ interface mixin TouchEventHandlers {
 
 HTMLElement includes GlobalEventHandlers;
 HTMLElement includes HTMLOrForeignElement;
 HTMLElement includes DocumentAndElementEventHandlers;
 HTMLElement includes ElementCSSInlineStyle;
 HTMLElement includes TouchEventHandlers;
 HTMLElement includes OnErrorEventHandlerForNodes;
 
+[Exposed=Window]
 interface HTMLUnknownElement : HTMLElement {};
--- a/dom/webidl/HTMLEmbedElement.webidl
+++ b/dom/webidl/HTMLEmbedElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
-[HTMLConstructor, NeedResolve]
+[HTMLConstructor, NeedResolve,
+ Exposed=Window]
 interface HTMLEmbedElement : HTMLElement {
   [CEReactions, Pure, SetterThrows]
            attribute DOMString src;
   [CEReactions, Pure, SetterThrows]
            attribute DOMString type;
   [CEReactions, Pure, SetterThrows]
            attribute DOMString width;
   [CEReactions, Pure, SetterThrows]
--- a/dom/webidl/HTMLFieldSetElement.webidl
+++ b/dom/webidl/HTMLFieldSetElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-fieldset-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLFieldSetElement : HTMLElement {
   [CEReactions, SetterThrows]
            attribute boolean disabled;
   readonly attribute HTMLFormElement? form;
   [CEReactions, SetterThrows]
            attribute DOMString name;
 
   readonly attribute DOMString type;
--- a/dom/webidl/HTMLFontElement.webidl
+++ b/dom/webidl/HTMLFontElement.webidl
@@ -6,14 +6,15 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLFontElement : HTMLElement {
   [CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString color;
   [CEReactions, SetterThrows]                          attribute DOMString face;
   [CEReactions, SetterThrows]                          attribute DOMString size;
 };
--- a/dom/webidl/HTMLFormControlsCollection.webidl
+++ b/dom/webidl/HTMLFormControlsCollection.webidl
@@ -6,12 +6,13 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#htmlformcontrolscollection
  *
  * © Copyright 2004-2013 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
+[Exposed=Window]
 interface HTMLFormControlsCollection : HTMLCollection {
   // inherits length and item()
   /* legacycaller */ getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
 };
--- a/dom/webidl/HTMLFormElement.webidl
+++ b/dom/webidl/HTMLFormElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[OverrideBuiltins, LegacyUnenumerableNamedProperties, HTMLConstructor]
+[OverrideBuiltins, LegacyUnenumerableNamedProperties, HTMLConstructor,
+ Exposed=Window]
 interface HTMLFormElement : HTMLElement {
            [CEReactions, Pure, SetterThrows]
            attribute DOMString acceptCharset;
            [CEReactions, Pure, SetterThrows]
            attribute DOMString action;
            [CEReactions, Pure, SetterThrows]
            attribute DOMString autocomplete;
            [CEReactions, Pure, SetterThrows]
--- a/dom/webidl/HTMLFrameElement.webidl
+++ b/dom/webidl/HTMLFrameElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLFrameElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString name;
            [CEReactions, SetterThrows]
            attribute DOMString scrolling;
            [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
            attribute DOMString src;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLFrameSetElement.webidl
+++ b/dom/webidl/HTMLFrameSetElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLFrameSetElement : HTMLElement {
   [CEReactions, SetterThrows]
   attribute DOMString cols;
   [CEReactions, SetterThrows]
   attribute DOMString rows;
 };
 
 HTMLFrameSetElement includes WindowEventHandlers;
--- a/dom/webidl/HTMLHRElement.webidl
+++ b/dom/webidl/HTMLHRElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLHRElement : HTMLElement {
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLHRElement {
            [CEReactions, SetterThrows]
            attribute DOMString align;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLHeadElement.webidl
+++ b/dom/webidl/HTMLHeadElement.webidl
@@ -7,11 +7,12 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLHeadElement : HTMLElement {};
 
--- a/dom/webidl/HTMLHeadingElement.webidl
+++ b/dom/webidl/HTMLHeadingElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLHeadingElement : HTMLElement {
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLHeadingElement {
            [CEReactions, SetterThrows]
            attribute DOMString align;
 };
--- a/dom/webidl/HTMLHtmlElement.webidl
+++ b/dom/webidl/HTMLHtmlElement.webidl
@@ -8,16 +8,17 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLHtmlElement : HTMLElement {};
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLHtmlElement {
            [CEReactions, SetterThrows, Pure]
            attribute DOMString version;
 };
--- a/dom/webidl/HTMLIFrameElement.webidl
+++ b/dom/webidl/HTMLIFrameElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * https://wicg.github.io/feature-policy/#policy
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLIFrameElement : HTMLElement {
   [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure]
            attribute DOMString src;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString srcdoc;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString name;
   [PutForwards=value] readonly attribute DOMTokenList sandbox;
--- a/dom/webidl/HTMLImageElement.webidl
+++ b/dom/webidl/HTMLImageElement.webidl
@@ -12,17 +12,18 @@
  */
 
 interface imgINotificationObserver;
 interface imgIRequest;
 interface URI;
 interface nsIStreamListener;
 
 [HTMLConstructor,
- NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
+ NamedConstructor=Image(optional unsigned long width, optional unsigned long height),
+ Exposed=Window]
 interface HTMLImageElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString alt;
            [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
            attribute DOMString src;
            [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
            attribute DOMString srcset;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLInputElement.webidl
+++ b/dom/webidl/HTMLInputElement.webidl
@@ -17,17 +17,18 @@ enum SelectionMode {
   "select",
   "start",
   "end",
   "preserve",
 };
 
 interface XULControllers;
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLInputElement : HTMLElement {
   [CEReactions, Pure, SetterThrows]
            attribute DOMString accept;
   [CEReactions, Pure, SetterThrows]
            attribute DOMString alt;
   [CEReactions, Pure, SetterThrows]
            attribute DOMString autocomplete;
   [CEReactions, Pure, SetterThrows]
--- a/dom/webidl/HTMLLIElement.webidl
+++ b/dom/webidl/HTMLLIElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLLIElement : HTMLElement {
            [CEReactions, SetterThrows, Pure]
            attribute long value;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLLIElement {
            [CEReactions, SetterThrows, Pure]
--- a/dom/webidl/HTMLLabelElement.webidl
+++ b/dom/webidl/HTMLLabelElement.webidl
@@ -6,15 +6,16 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLLabelElement : HTMLElement {
   readonly attribute HTMLFormElement? form;
   [CEReactions]
            attribute DOMString htmlFor;
   readonly attribute HTMLElement? control;
 };
--- a/dom/webidl/HTMLLegendElement.webidl
+++ b/dom/webidl/HTMLLegendElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLLegendElement : HTMLElement {
   readonly attribute HTMLFormElement? form;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLLegendElement {
            [CEReactions, SetterThrows]
            attribute DOMString align;
--- a/dom/webidl/HTMLLinkElement.webidl
+++ b/dom/webidl/HTMLLinkElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLLinkElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
            attribute boolean disabled;
   [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure]
            attribute DOMString href;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString? crossOrigin;
   [CEReactions, SetterThrows, Pure]
--- a/dom/webidl/HTMLMapElement.webidl
+++ b/dom/webidl/HTMLMapElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLMapElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
            attribute DOMString name;
   [Constant]
   readonly attribute HTMLCollection areas;
   // Not supported yet.
   //readonly attribute HTMLCollection images;
 };
--- a/dom/webidl/HTMLMarqueeElement.webidl
+++ b/dom/webidl/HTMLMarqueeElement.webidl
@@ -7,17 +7,18 @@
  * https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLMarqueeElement : HTMLElement {
   [CEReactions, SetterThrows] attribute DOMString behavior;
   [CEReactions, SetterThrows] attribute DOMString bgColor;
   [CEReactions, SetterThrows] attribute DOMString direction;
   [CEReactions, SetterThrows] attribute DOMString height;
   [CEReactions, SetterThrows] attribute unsigned long hspace;
   [CEReactions, SetterThrows] attribute long loop;
   [CEReactions, SetterThrows] attribute unsigned long scrollAmount;
--- a/dom/webidl/HTMLMediaElement.webidl
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#media-elements
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
+[Exposed=Window]
 interface HTMLMediaElement : HTMLElement {
 
   // error state
   readonly attribute MediaError? error;
 
   // network state
   [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
            attribute DOMString src;
--- a/dom/webidl/HTMLMenuElement.webidl
+++ b/dom/webidl/HTMLMenuElement.webidl
@@ -10,17 +10,18 @@
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 interface MenuBuilder;
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLMenuElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString type;
            [CEReactions, SetterThrows]
            attribute DOMString label;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
--- a/dom/webidl/HTMLMenuItemElement.webidl
+++ b/dom/webidl/HTMLMenuItemElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLMenuItemElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString type;
            [CEReactions, SetterThrows]
            attribute DOMString label;
            [CEReactions, SetterThrows]
            attribute DOMString icon;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLMetaElement.webidl
+++ b/dom/webidl/HTMLMetaElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLMetaElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
            attribute DOMString name;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString httpEquiv;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString content;
 };
--- a/dom/webidl/HTMLMeterElement.webidl
+++ b/dom/webidl/HTMLMeterElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element	
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLMeterElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute double value;
            [CEReactions, SetterThrows]
            attribute double min;
            [CEReactions, SetterThrows]
            attribute double max;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLModElement.webidl
+++ b/dom/webidl/HTMLModElement.webidl
@@ -6,15 +6,16 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLModElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
            attribute DOMString cite;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString dateTime;
 };
--- a/dom/webidl/HTMLOListElement.webidl
+++ b/dom/webidl/HTMLOListElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLOListElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute boolean reversed;
            [CEReactions, SetterThrows]
            attribute long start;
            [CEReactions, SetterThrows]
            attribute DOMString type;
 };
--- a/dom/webidl/HTMLObjectElement.webidl
+++ b/dom/webidl/HTMLObjectElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
-[HTMLConstructor, NeedResolve]
+[HTMLConstructor, NeedResolve,
+ Exposed=Window]
 interface HTMLObjectElement : HTMLElement {
   [CEReactions, Pure, SetterThrows]
            attribute DOMString data;
   [CEReactions, Pure, SetterThrows]
            attribute DOMString type;
   [CEReactions, Pure, SetterThrows]
            attribute DOMString name;
   [CEReactions, Pure, SetterThrows]
--- a/dom/webidl/HTMLOptGroupElement.webidl
+++ b/dom/webidl/HTMLOptGroupElement.webidl
@@ -6,15 +6,16 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-optgroup-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLOptGroupElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute boolean disabled;
            [CEReactions, SetterThrows]
            attribute DOMString label;
 };
--- a/dom/webidl/HTMLOptionElement.webidl
+++ b/dom/webidl/HTMLOptionElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-option-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor, NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)]
+[HTMLConstructor, NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false),
+ Exposed=Window]
 interface HTMLOptionElement : HTMLElement {
   [CEReactions, SetterThrows]
   attribute boolean disabled;
   readonly attribute HTMLFormElement? form;
   [CEReactions, SetterThrows]
   attribute DOMString label;
   [CEReactions, SetterThrows]
   attribute boolean defaultSelected;
--- a/dom/webidl/HTMLOptionsCollection.webidl
+++ b/dom/webidl/HTMLOptionsCollection.webidl
@@ -5,16 +5,17 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-html5-20120329/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+[Exposed=Window]
 interface HTMLOptionsCollection : HTMLCollection {
   [CEReactions, SetterThrows]
   attribute unsigned long length;
   [CEReactions, Throws]
   setter void (unsigned long index, HTMLOptionElement? option);
   [CEReactions, Throws]
   void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
   [CEReactions]
--- a/dom/webidl/HTMLOutputElement.webidl
+++ b/dom/webidl/HTMLOutputElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLOutputElement : HTMLElement {
   [PutForwards=value, Constant]
   readonly attribute DOMTokenList htmlFor;
   readonly attribute HTMLFormElement? form;
   [CEReactions, SetterThrows, Pure]
            attribute DOMString name;
 
   [Constant]
--- a/dom/webidl/HTMLParagraphElement.webidl
+++ b/dom/webidl/HTMLParagraphElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLParagraphElement : HTMLElement {
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLParagraphElement {
            [CEReactions, SetterThrows]
            attribute DOMString align;
 };
--- a/dom/webidl/HTMLParamElement.webidl
+++ b/dom/webidl/HTMLParamElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLParamElement : HTMLElement {
            [CEReactions, SetterThrows, Pure]
            attribute DOMString name;
            [CEReactions, SetterThrows, Pure]
            attribute DOMString value;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
--- a/dom/webidl/HTMLPictureElement.webidl
+++ b/dom/webidl/HTMLPictureElement.webidl
@@ -1,9 +1,10 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLPictureElement : HTMLElement {
 };
--- a/dom/webidl/HTMLPreElement.webidl
+++ b/dom/webidl/HTMLPreElement.webidl
@@ -7,17 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLPreElement : HTMLElement {
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLPreElement {
            [CEReactions, SetterThrows]
            attribute long width;
 };
--- a/dom/webidl/HTMLProgressElement.webidl
+++ b/dom/webidl/HTMLProgressElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLProgressElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute double value;
            [CEReactions, SetterThrows]
            attribute double max;
   readonly attribute double position;
   readonly attribute NodeList labels;
 };
--- a/dom/webidl/HTMLQuoteElement.webidl
+++ b/dom/webidl/HTMLQuoteElement.webidl
@@ -7,14 +7,15 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLQuoteElement : HTMLElement {
            [CEReactions, SetterThrows, Pure]
            attribute DOMString cite;
 };
 
--- a/dom/webidl/HTMLScriptElement.webidl
+++ b/dom/webidl/HTMLScriptElement.webidl
@@ -3,17 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-script-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLScriptElement : HTMLElement {
   [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
   attribute DOMString src;
   [CEReactions, SetterThrows]
   attribute DOMString type;
   [CEReactions, SetterThrows, Pref="dom.moduleScripts.enabled"]
   attribute boolean noModule;
   [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLSelectElement.webidl
+++ b/dom/webidl/HTMLSelectElement.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/html/#the-select-element
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLSelectElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
   attribute boolean autofocus;
   [CEReactions, SetterThrows, Pure]
   attribute DOMString autocomplete;
   [CEReactions, SetterThrows, Pure]
   attribute boolean disabled;
   [Pure]
--- a/dom/webidl/HTMLSourceElement.webidl
+++ b/dom/webidl/HTMLSourceElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-source-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLSourceElement : HTMLElement {
            [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
            attribute DOMString src;
            [CEReactions, SetterThrows]
            attribute DOMString type;
 };
 
 partial interface HTMLSourceElement {
--- a/dom/webidl/HTMLSpanElement.webidl
+++ b/dom/webidl/HTMLSpanElement.webidl
@@ -7,10 +7,11 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLSpanElement : HTMLElement {};
--- a/dom/webidl/HTMLStyleElement.webidl
+++ b/dom/webidl/HTMLStyleElement.webidl
@@ -3,17 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-style-element
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLStyleElement : HTMLElement {
            [Pure]
            attribute boolean disabled;
            [CEReactions, SetterThrows, Pure]
            attribute DOMString media;
            [CEReactions, SetterThrows, Pure]
            attribute DOMString type;
 };
--- a/dom/webidl/HTMLTableCaptionElement.webidl
+++ b/dom/webidl/HTMLTableCaptionElement.webidl
@@ -6,15 +6,16 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTableCaptionElement : HTMLElement {};
 
 partial interface HTMLTableCaptionElement {
            [CEReactions, SetterThrows]
            attribute DOMString align;
 };
--- a/dom/webidl/HTMLTableCellElement.webidl
+++ b/dom/webidl/HTMLTableCellElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTableCellElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute unsigned long colSpan;
            [CEReactions, SetterThrows]
            attribute unsigned long rowSpan;
   //[PutForwards=value] readonly attribute DOMTokenList headers;
            [CEReactions, SetterThrows]
            attribute DOMString headers;
--- a/dom/webidl/HTMLTableColElement.webidl
+++ b/dom/webidl/HTMLTableColElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTableColElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute unsigned long span;
 };
 
 partial interface HTMLTableColElement {
            [CEReactions, SetterThrows]
            attribute DOMString align;
--- a/dom/webidl/HTMLTableElement.webidl
+++ b/dom/webidl/HTMLTableElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTableElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute HTMLTableCaptionElement? caption;
   HTMLElement createCaption();
   [CEReactions]
   void deleteCaption();
            [CEReactions, SetterThrows]
            attribute HTMLTableSectionElement? tHead;
--- a/dom/webidl/HTMLTableRowElement.webidl
+++ b/dom/webidl/HTMLTableRowElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTableRowElement : HTMLElement {
   readonly attribute long rowIndex;
   readonly attribute long sectionRowIndex;
   readonly attribute HTMLCollection cells;
   [Throws]
   HTMLElement insertCell(optional long index = -1);
   [CEReactions, Throws]
   void deleteCell(long index);
--- a/dom/webidl/HTMLTableSectionElement.webidl
+++ b/dom/webidl/HTMLTableSectionElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTableSectionElement : HTMLElement {
   readonly attribute HTMLCollection rows;
   [Throws]
   HTMLElement insertRow(optional long index = -1);
   [CEReactions, Throws]
   void deleteRow(long index);
 };
 
--- a/dom/webidl/HTMLTemplateElement.webidl
+++ b/dom/webidl/HTMLTemplateElement.webidl
@@ -4,13 +4,14 @@
  *
  * The origin of this IDL file is
  * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTemplateElement : HTMLElement {
     readonly attribute DocumentFragment content;
 };
 
--- a/dom/webidl/HTMLTextAreaElement.webidl
+++ b/dom/webidl/HTMLTextAreaElement.webidl
@@ -9,17 +9,18 @@
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 interface nsIEditor;
 interface XULControllers;
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTextAreaElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
            attribute DOMString autocomplete;
   [CEReactions, SetterThrows, Pure]
            attribute boolean autofocus;
   [CEReactions, SetterThrows, Pure]
            attribute unsigned long cols;
            // attribute DOMString dirName;
--- a/dom/webidl/HTMLTimeElement.webidl
+++ b/dom/webidl/HTMLTimeElement.webidl
@@ -2,13 +2,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTimeElement : HTMLElement {
            [CEReactions, SetterThrows]
            attribute DOMString dateTime;
 };
--- a/dom/webidl/HTMLTitleElement.webidl
+++ b/dom/webidl/HTMLTitleElement.webidl
@@ -2,13 +2,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-title-element
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTitleElement : HTMLElement {
            [CEReactions, Throws]
            attribute DOMString text;
 };
--- a/dom/webidl/HTMLTrackElement.webidl
+++ b/dom/webidl/HTMLTrackElement.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-track-element
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLTrackElement : HTMLElement {
   [CEReactions, SetterThrows, Pure]
   attribute DOMString kind;
   [CEReactions, SetterThrows, Pure]
   attribute DOMString src;
   [CEReactions, SetterThrows, Pure]
   attribute DOMString srclang;
   [CEReactions, SetterThrows, Pure]
--- a/dom/webidl/HTMLUListElement.webidl
+++ b/dom/webidl/HTMLUListElement.webidl
@@ -8,17 +8,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLUListElement : HTMLElement {
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLUListElement {
            [CEReactions, SetterThrows]
            attribute boolean compact;
            [CEReactions, SetterThrows]
--- a/dom/webidl/HTMLVideoElement.webidl
+++ b/dom/webidl/HTMLVideoElement.webidl
@@ -6,17 +6,18 @@
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-video-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[HTMLConstructor]
+[HTMLConstructor,
+ Exposed=Window]
 interface HTMLVideoElement : HTMLMediaElement {
   [CEReactions, SetterThrows]
            attribute unsigned long width;
   [CEReactions, SetterThrows]
            attribute unsigned long height;
   readonly attribute unsigned long videoWidth;
   readonly attribute unsigned long videoHeight;
   [CEReactions, SetterThrows]
--- a/dom/webidl/HashChangeEvent.webidl
+++ b/dom/webidl/HashChangeEvent.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://html.spec.whatwg.org/multipage/#the-hashchangeevent-interface
  */
 
-[LegacyEventInit]
+[LegacyEventInit,
+ Exposed=Window]
 interface HashChangeEvent : Event
 {
   constructor(DOMString type, optional HashChangeEventInit eventInitDict = {});
 
   readonly attribute DOMString oldURL;
   readonly attribute DOMString newURL;
 
   void initHashChangeEvent(DOMString typeArg,
--- a/dom/webidl/HiddenPluginEvent.webidl
+++ b/dom/webidl/HiddenPluginEvent.webidl
@@ -1,11 +1,12 @@
 interface PluginTag;
 
-[ChromeOnly]
+[ChromeOnly,
+ Exposed=Window]
 interface HiddenPluginEvent : Event
 {
   constructor(DOMString type, optional HiddenPluginEventInit eventInit = {});
 
   readonly attribute PluginTag? tag;
 };
 
 dictionary HiddenPluginEventInit : EventInit
--- a/dom/webidl/History.webidl
+++ b/dom/webidl/History.webidl
@@ -8,16 +8,17 @@
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 enum ScrollRestoration { "auto", "manual" };
 
+[Exposed=Window]
 interface History {
   [Throws]
   readonly attribute unsigned long length;
   [Throws]
   attribute ScrollRestoration scrollRestoration;
   [Throws]
   readonly attribute any state;
   [Throws]
--- a/dom/webidl/IDBFileHandle.webidl
+++ b/dom/webidl/IDBFileHandle.webidl
@@ -3,17 +3,17 @@
  * You can obtaone at http://mozilla.org/MPL/2.0/. */
 
 dictionary IDBFileMetadataParameters
 {
   boolean size = true;
   boolean lastModified = true;
 };
 
-[Exposed=(Window)]
+[Exposed=Window]
 interface IDBFileHandle : EventTarget
 {
   readonly attribute IDBMutableFile? mutableFile;
   // this is deprecated due to renaming in the spec
   readonly attribute IDBMutableFile? fileHandle; // now mutableFile
   readonly attribute FileMode mode;
   readonly attribute boolean active;
   attribute unsigned long long? location;
--- a/dom/webidl/IIRFilterNode.webidl
+++ b/dom/webidl/IIRFilterNode.webidl
@@ -9,17 +9,18 @@
  * liability, trademark and document use rules apply.
  */
 
 dictionary IIRFilterOptions : AudioNodeOptions {
     required sequence<double> feedforward;
     required sequence<double> feedback;
 };
 
-[Pref="dom.webaudio.enabled"]
+[Pref="dom.webaudio.enabled",
+ Exposed=Window]
 interface IIRFilterNode : AudioNode {
     [Throws]
     constructor(BaseAudioContext context, IIRFilterOptions options);
 
     void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse);
 };
 
 // Mozilla extension
--- a/dom/webidl/ImageCapture.webidl
+++ b/dom/webidl/ImageCapture.webidl
@@ -5,17 +5,18 @@
  *
  * The origin of this IDL file is
  * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
  *
  * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  * W3C liability, trademark and document use rules apply.
  */
 
-[Pref="dom.imagecapture.enabled"]
+[Pref="dom.imagecapture.enabled",
+ Exposed=Window]
 interface ImageCapture : EventTarget {
   [Throws]
   constructor(MediaStreamTrack track);
 
   // readonly attribute PhotoSettingsOptions photoSettingsOptions;
   [BinaryName="GetVideoStreamTrack"]
   readonly attribute MediaStreamTrack videoStreamTrack;
   attribute EventHandler onphoto;
--- a/dom/webidl/ImageCaptureErrorEvent.webidl
+++ b/dom/webidl/ImageCaptureErrorEvent.webidl
@@ -5,29 +5,31 @@
  *
  * The origin of this IDL file is
  * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
  *
  * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  * W3C liability, trademark and document use rules apply.
  */
 
-[Pref="dom.imagecapture.enabled"]
+[Pref="dom.imagecapture.enabled",
+ Exposed=Window]
 interface ImageCaptureErrorEvent : Event {
   constructor(DOMString type,
               optional ImageCaptureErrorEventInit imageCaptureErrorInitDict = {});
 
   readonly attribute ImageCaptureError? imageCaptureError;
 };
 
 dictionary ImageCaptureErrorEventInit : EventInit {
   ImageCaptureError? imageCaptureError = null;
 };
 
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface ImageCaptureError {
   const unsigned short FRAME_GRAB_ERROR = 1;
   const unsigned short SETTINGS_ERROR = 2;
   const unsigned short PHOTO_ERROR = 3;
   const unsigned short ERROR_UNKNOWN = 4;
   readonly attribute unsigned short code;
   readonly attribute DOMString message;
 };
--- a/dom/webidl/ImageDocument.webidl
+++ b/dom/webidl/ImageDocument.webidl
@@ -4,17 +4,18 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * dom/html/public/nsIImageDocument.idl
  */
 
 interface imgIRequest;
 
-[ChromeOnly, OverrideBuiltins]
+[ChromeOnly, OverrideBuiltins,
+ Exposed=Window]
 interface ImageDocument : HTMLDocument {
   /* Whether the image is overflowing visible area. */
   readonly attribute boolean imageIsOverflowing;
 
   /* Whether the image has been resized to fit visible area. */
   readonly attribute boolean imageIsResized;
 
   /* The image request being displayed in the content area */
--- a/dom/webidl/InputEvent.webidl
+++ b/dom/webidl/InputEvent.webidl
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://w3c.github.io/input-events/#interface-InputEvent
  */
 
+[Exposed=Window]
 interface InputEvent : UIEvent
 {
   constructor(DOMString type, optional InputEventInit eventInitDict = {});
 
   readonly attribute boolean       isComposing;
 
   [Pref="dom.inputevent.inputtype.enabled"]
   readonly attribute DOMString inputType;
--- a/dom/webidl/InstallTrigger.webidl
+++ b/dom/webidl/InstallTrigger.webidl
@@ -15,17 +15,18 @@ dictionary InstallTriggerData {
   DOMString? IconURL;
   DOMString? Hash;
 };
 
 /**
  * The interface for the InstallTrigger object available to all websites.
  */
 [ChromeOnly,
- JSImplementation="@mozilla.org/addons/installtrigger;1"]
+ JSImplementation="@mozilla.org/addons/installtrigger;1",
+ Exposed=Window]
 interface InstallTriggerImpl {
   /**
    * Retained for backwards compatibility.
    */
   const unsigned short SKIN = 1;
   const unsigned short LOCALE = 2;
   const unsigned short CONTENT = 4;
   const unsigned short PACKAGE = 7;
--- a/dom/webidl/IntersectionObserver.webidl
+++ b/dom/webidl/IntersectionObserver.webidl
@@ -2,17 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://wicg.github.io/IntersectionObserver/
  */
 
-[ProbablyShortLivingWrapper, Pref="dom.IntersectionObserver.enabled"]
+[ProbablyShortLivingWrapper, Pref="dom.IntersectionObserver.enabled",
+ Exposed=Window]
 interface IntersectionObserverEntry {
   [Constant]
   readonly attribute DOMHighResTimeStamp time;
   [Constant]
   readonly attribute DOMRectReadOnly? rootBounds;
   [Constant]
   readonly attribute DOMRectReadOnly boundingClientRect;
   [Constant]
@@ -20,17 +21,18 @@ interface IntersectionObserverEntry {
   [Constant]
   readonly attribute boolean isIntersecting;
   [Constant]
   readonly attribute double intersectionRatio;
   [Constant]
   readonly attribute Element target;
 };
 
-[Pref="dom.IntersectionObserver.enabled"]
+[Pref="dom.IntersectionObserver.enabled",
+ Exposed=Window]
 interface IntersectionObserver {
   [Throws]
   constructor(IntersectionCallback intersectionCallback,
               optional IntersectionObserverInit options = {});
 
   [Constant]
   readonly attribute Element? root;
   [Constant]
--- a/dom/webidl/IntlUtils.webidl
+++ b/dom/webidl/IntlUtils.webidl
@@ -16,17 +16,18 @@ dictionary DisplayNameResult {
 dictionary LocaleInfo {
   DOMString locale;
   DOMString direction;
 };
 
 /**
  * The IntlUtils interface provides helper functions for localization.
  */
-[NoInterfaceObject]
+[NoInterfaceObject,
+ Exposed=Window]
 interface IntlUtils {
   /**
    * Helper function to retrieve the localized values for a list of requested
    * keys.