Try to enable all webidls (#573)

* Try to enable all webidls

* Separate out unavailable webidl files by reason.

* Create record of fully tested WebIDL files

* Update notes to reflect new situation with web-idl

* Make a blank ident fail, disable the necessary widls.

It turns out that all the blank idents came from blank enum variants,
which is allowed in webidl apparently.
This commit is contained in:
Richard Dodd (dodj) 2018-07-30 00:07:19 +01:00 committed by Alex Crichton
parent b7af4e3169
commit 71255acf5d
599 changed files with 802 additions and 74 deletions

View File

@ -26,7 +26,9 @@ fn is_rust_keyword(name: &str) -> bool {
// Create an `Ident`, possibly mangling it if it conflicts with a Rust keyword. // Create an `Ident`, possibly mangling it if it conflicts with a Rust keyword.
pub fn rust_ident(name: &str) -> Ident { pub fn rust_ident(name: &str) -> Ident {
if is_rust_keyword(name) { if name == "" {
panic!("tried to create empty Ident (from \"\")");
} else if is_rust_keyword(name) {
Ident::new(&format!("{}_", name), proc_macro2::Span::call_site()) Ident::new(&format!("{}_", name), proc_macro2::Span::call_site())
} else { } else {
raw_ident(name) raw_ident(name)

View File

@ -3,3 +3,685 @@
Raw bindings to Web APIs for projects using `wasm-bindgen`. Raw bindings to Web APIs for projects using `wasm-bindgen`.
The book: https://rustwasm.github.io/wasm-bindgen/web-sys.html The book: https://rustwasm.github.io/wasm-bindgen/web-sys.html
## Tested WebIDL bindings
Below is a list of all the WebIDL files we want to generate bindings for, with a `x` where the
bindings are fully working and have full test coverage.
- [ ] AbortController.webidl
- [ ] AbortSignal.webidl
- [ ] AbstractWorker.webidl
- [ ] AnalyserNode.webidl
- [ ] AnimationEffect.webidl
- [ ] AnimationEvent.webidl
- [ ] Attr.webidl
- [ ] AudioBufferSourceNode.webidl
- [ ] AudioBuffer.webidl
- [ ] AudioContext.webidl
- [ ] AudioDestinationNode.webidl
- [ ] AudioListener.webidl
- [ ] AudioParamMap.webidl
- [ ] AudioParam.webidl
- [ ] AudioProcessingEvent.webidl
- [ ] AudioScheduledSourceNode.webidl
- [ ] AudioStreamTrack.webidl
- [ ] AudioTrackList.webidl
- [ ] AudioTrack.webidl
- [ ] AudioWorkletGlobalScope.webidl
- [ ] AudioWorkletNode.webidl
- [ ] AudioWorkletProcessor.webidl
- [ ] AudioWorklet.webidl
- [ ] AutocompleteInfo.webidl
- [ ] BarProp.webidl
- [ ] BaseAudioContext.webidl
- [ ] BaseKeyframeTypes.webidl
- [ ] BasicCardPayment.webidl
- [ ] BatteryManager.webidl
- [ ] BeforeUnloadEvent.webidl
- [ ] BiquadFilterNode.webidl
- [ ] BlobEvent.webidl
- [ ] Blob.webidl
- [ ] BoxObject.webidl
- [ ] BroadcastChannel.webidl
- [ ] BrowserElementDictionaries.webidl
- [ ] BrowserElement.webidl
- [ ] BrowserFeedWriter.webidl
- [ ] CacheStorage.webidl
- [ ] Cache.webidl
- [ ] CanvasCaptureMediaStream.webidl
- [ ] CaretPosition.webidl
- [ ] CaretStateChangedEvent.webidl
- [ ] CDATASection.webidl
- [ ] ChannelMergerNode.webidl
- [ ] ChannelSplitterNode.webidl
- [ ] CharacterData.webidl
- [ ] CheckerboardReportService.webidl
- [ ] ChildNode.webidl
- [ ] ChildSHistory.webidl
- [ ] ChromeNodeList.webidl
- [ ] Clients.webidl
- [ ] Client.webidl
- [ ] ClipboardEvent.webidl
- [ ] CloseEvent.webidl
- [ ] CommandEvent.webidl
- [ ] Comment.webidl
- [ ] CompositionEvent.webidl
- [ ] Console.webidl
- [ ] ConstantSourceNode.webidl
- [ ] ConvolverNode.webidl
- [ ] Coordinates.webidl
- [ ] CreateOfferRequest.webidl
- [ ] CredentialManagement.webidl
- [ ] Crypto.webidl
- [ ] CSPDictionaries.webidl
- [ ] CSPReport.webidl
- [ ] CSSAnimation.webidl
- [ ] CSSConditionRule.webidl
- [ ] CSSCounterStyleRule.webidl
- [ ] CSSFontFaceRule.webidl
- [ ] CSSFontFeatureValuesRule.webidl
- [ ] CSSGroupingRule.webidl
- [ ] CSSImportRule.webidl
- [ ] CSSKeyframeRule.webidl
- [ ] CSSKeyframesRule.webidl
- [ ] CSSMediaRule.webidl
- [ ] CSSMozDocumentRule.webidl
- [ ] CSSNamespaceRule.webidl
- [ ] CSSPageRule.webidl
- [ ] CSSPseudoElement.webidl
- [ ] CSSRuleList.webidl
- [ ] CSSRule.webidl
- [ ] CSSStyleDeclaration.webidl
- [ ] CSSStyleRule.webidl
- [ ] CSSStyleSheet.webidl
- [ ] CSSSupportsRule.webidl
- [ ] CSSTransition.webidl
- [ ] CSS.webidl
- [ ] CustomElementRegistry.webidl
- [ ] CustomEvent.webidl
- [ ] DataTransferItem.webidl
- [ ] DataTransfer.webidl
- [ ] DecoderDoctorNotification.webidl
- [ ] DedicatedWorkerGlobalScope.webidl
- [ ] DelayNode.webidl
- [ ] DeviceLightEvent.webidl
- [ ] DeviceProximityEvent.webidl
- [ ] Directory.webidl
- [ ] DocumentFragment.webidl
- [ ] DocumentOrShadowRoot.webidl
- [ ] DocumentTimeline.webidl
- [ ] DocumentType.webidl
- [ ] Document.webidl
- [ ] DOMError.webidl
- [ ] DOMException.webidl
- [ ] DOMHighResTimeStamp.webidl
- [ ] DOMImplementation.webidl
- [ ] DOMParser.webidl
- [ ] DOMPoint.webidl
- [ ] DOMQuad.webidl
- [ ] DOMRectList.webidl
- [ ] DOMRect.webidl
- [ ] DOMRequest.webidl
- [ ] DOMStringList.webidl
- [ ] DOMStringMap.webidl
- [ ] DOMTokenList.webidl
- [ ] DragEvent.webidl
- [ ] DynamicsCompressorNode.webidl
- [ ] Element.webidl
- [ ] ErrorEvent.webidl
- [ ] EventHandler.webidl
- [ ] EventListener.webidl
- [ ] EventSource.webidl
- [ ] EventTarget.webidl
- [ ] Event.webidl
- [ ] ExtendableEvent.webidl
- [ ] ExtendableMessageEvent.webidl
- [ ] External.webidl
- [ ] FakePluginTagInit.webidl
- [ ] FetchEvent.webidl
- [ ] FetchObserver.webidl
- [ ] Fetch.webidl
- [ ] FileList.webidl
- [ ] FileReaderSync.webidl
- [ ] FileReader.webidl
- [ ] FileSystemDirectoryEntry.webidl
- [ ] FileSystemDirectoryReader.webidl
- [ ] FileSystemEntry.webidl
- [ ] FileSystemFileEntry.webidl
- [ ] FileSystem.webidl
- [ ] File.webidl
- [ ] Flex.webidl
- [ ] FocusEvent.webidl
- [ ] FontFaceSetLoadEvent.webidl
- [ ] FontFaceSet.webidl
- [ ] FontFaceSource.webidl
- [ ] FontFace.webidl
- [ ] FrameLoader.webidl
- [ ] Function.webidl
- [ ] FuzzingFunctions.webidl
- [ ] GainNode.webidl
- [ ] GamepadAxisMoveEvent.webidl
- [ ] GamepadButtonEvent.webidl
- [ ] GamepadEvent.webidl
- [ ] GamepadHapticActuator.webidl
- [ ] GamepadPose.webidl
- [ ] GamepadServiceTest.webidl
- [ ] Gamepad.webidl
- [ ] Geolocation.webidl
- [ ] GeometryUtils.webidl
- [ ] GetUserMediaRequest.webidl
- [ ] Grid.webidl
- [ ] GroupedHistoryEvent.webidl
- [ ] HashChangeEvent.webidl
- [ ] Headers.webidl
- [ ] HiddenPluginEvent.webidl
- [ ] History.webidl
- [ ] HTMLAllCollection.webidl
- [ ] HTMLAnchorElement.webidl
- [ ] HTMLAreaElement.webidl
- [ ] HTMLAudioElement.webidl
- [ ] HTMLBaseElement.webidl
- [ ] HTMLBodyElement.webidl
- [ ] HTMLBRElement.webidl
- [ ] HTMLButtonElement.webidl
- [ ] HTMLCanvasElement.webidl
- [ ] HTMLCollection.webidl
- [ ] HTMLDataElement.webidl
- [ ] HTMLDataListElement.webidl
- [ ] HTMLDetailsElement.webidl
- [ ] HTMLDialogElement.webidl
- [ ] HTMLDirectoryElement.webidl
- [ ] HTMLDivElement.webidl
- [ ] HTMLDListElement.webidl
- [ ] HTMLDocument.webidl
- [ ] HTMLElement.webidl
- [ ] HTMLEmbedElement.webidl
- [ ] HTMLFieldSetElement.webidl
- [ ] HTMLFontElement.webidl
- [ ] HTMLFormControlsCollection.webidl
- [ ] HTMLFormElement.webidl
- [ ] HTMLFrameElement.webidl
- [ ] HTMLFrameSetElement.webidl
- [ ] HTMLHeadElement.webidl
- [ ] HTMLHeadingElement.webidl
- [ ] HTMLHRElement.webidl
- [ ] HTMLHtmlElement.webidl
- [ ] HTMLHyperlinkElementUtils.webidl
- [ ] HTMLIFrameElement.webidl
- [ ] HTMLImageElement.webidl
- [ ] HTMLInputElement.webidl
- [ ] HTMLLabelElement.webidl
- [ ] HTMLLegendElement.webidl
- [ ] HTMLLIElement.webidl
- [ ] HTMLLinkElement.webidl
- [ ] HTMLMapElement.webidl
- [ ] HTMLMediaElement.webidl
- [ ] HTMLMenuElement.webidl
- [ ] HTMLMenuItemElement.webidl
- [ ] HTMLMetaElement.webidl
- [ ] HTMLMeterElement.webidl
- [ ] HTMLModElement.webidl
- [ ] HTMLObjectElement.webidl
- [ ] HTMLOListElement.webidl
- [ ] HTMLOptGroupElement.webidl
- [ ] HTMLOptionElement.webidl
- [ ] HTMLOptionsCollection.webidl
- [ ] HTMLOutputElement.webidl
- [ ] HTMLParagraphElement.webidl
- [ ] HTMLParamElement.webidl
- [ ] HTMLPictureElement.webidl
- [ ] HTMLPreElement.webidl
- [ ] HTMLProgressElement.webidl
- [ ] HTMLQuoteElement.webidl
- [ ] HTMLScriptElement.webidl
- [ ] HTMLSelectElement.webidl
- [ ] HTMLSlotElement.webidl
- [ ] HTMLSourceElement.webidl
- [ ] HTMLSpanElement.webidl
- [ ] HTMLStyleElement.webidl
- [ ] HTMLTableCaptionElement.webidl
- [ ] HTMLTableCellElement.webidl
- [ ] HTMLTableColElement.webidl
- [ ] HTMLTableElement.webidl
- [ ] HTMLTableRowElement.webidl
- [ ] HTMLTableSectionElement.webidl
- [ ] HTMLTemplateElement.webidl
- [ ] HTMLTextAreaElement.webidl
- [ ] HTMLTimeElement.webidl
- [ ] HTMLTitleElement.webidl
- [ ] HTMLTrackElement.webidl
- [ ] HTMLUListElement.webidl
- [ ] HTMLVideoElement.webidl
- [ ] IDBCursor.webidl
- [ ] IDBDatabase.webidl
- [ ] IDBFactory.webidl
- [ ] IDBFileRequest.webidl
- [ ] IDBIndex.webidl
- [ ] IDBMutableFile.webidl
- [ ] IDBObjectStore.webidl
- [ ] IDBOpenDBRequest.webidl
- [ ] IDBRequest.webidl
- [ ] IDBTransaction.webidl
- [ ] IdleDeadline.webidl
- [ ] IIRFilterNode.webidl
- [ ] ImageBitmapRenderingContext.webidl
- [ ] ImageBitmap.webidl
- [ ] ImageCaptureErrorEvent.webidl
- [ ] ImageCapture.webidl
- [ ] ImageDocument.webidl
- [ ] InputEvent.webidl
- [ ] InstallTrigger.webidl
- [ ] IntersectionObserver.webidl
- [ ] IntlUtils.webidl
- [ ] IterableIterator.webidl
- [ ] KeyAlgorithm.webidl
- [ ] KeyboardEvent.webidl
- [ ] KeyEvent.webidl
- [ ] KeyframeAnimationOptions.webidl
- [ ] KeyframeEffect.webidl
- [ ] KeyIdsInitData.webidl
- [ ] L10nUtils.webidl
- [ ] LegacyQueryInterface.webidl
- [ ] LinkStyle.webidl
- [ ] ListBoxObject.webidl
- [ ] LocalMediaStream.webidl
- [ ] Location.webidl
- [ ] MediaCapabilities.webidl
- [ ] MediaDeviceInfo.webidl
- [ ] MediaDevices.webidl
- [ ] MediaElementAudioSourceNode.webidl
- [ ] MediaEncryptedEvent.webidl
- [ ] MediaError.webidl
- [ ] MediaKeyError.webidl
- [ ] MediaKeyMessageEvent.webidl
- [ ] MediaKeySession.webidl
- [ ] MediaKeysRequestStatus.webidl
- [ ] MediaKeyStatusMap.webidl
- [ ] MediaKeys.webidl
- [ ] MediaKeySystemAccess.webidl
- [ ] MediaList.webidl
- [ ] MediaQueryListEvent.webidl
- [ ] MediaQueryList.webidl
- [ ] MediaRecorderErrorEvent.webidl
- [ ] MediaRecorder.webidl
- [ ] MediaSource.webidl
- [ ] MediaStreamAudioDestinationNode.webidl
- [ ] MediaStreamAudioSourceNode.webidl
- [ ] MediaStreamError.webidl
- [ ] MediaStreamEvent.webidl
- [ ] MediaStreamTrackEvent.webidl
- [ ] MediaStreamTrack.webidl
- [ ] MediaTrackConstraintSet.webidl
- [ ] MediaTrackSettings.webidl
- [ ] MediaTrackSupportedConstraints.webidl
- [ ] MenuBoxObject.webidl
- [ ] MessageChannel.webidl
- [ ] MessageEvent.webidl
- [ ] MessagePort.webidl
- [ ] MIDIAccess.webidl
- [ ] MIDIConnectionEvent.webidl
- [ ] MIDIInputMap.webidl
- [ ] MIDIInput.webidl
- [ ] MIDIMessageEvent.webidl
- [ ] MIDIOptions.webidl
- [ ] MIDIOutputMap.webidl
- [ ] MIDIOutput.webidl
- [ ] MIDIPort.webidl
- [ ] MimeTypeArray.webidl
- [ ] MimeType.webidl
- [ ] MouseEvent.webidl
- [ ] MouseScrollEvent.webidl
- [ ] MozApplicationEvent.webidl
- [ ] MutationEvent.webidl
- [ ] MutationObserver.webidl
- [ ] NamedNodeMap.webidl
- [ ] NativeOSFileInternals.webidl
- [ ] Navigator.webidl
- [ ] NetDashboard.webidl
- [ ] NetworkInformation.webidl
- [ ] NetworkOptions.webidl
- [ ] NodeFilter.webidl
- [ ] NodeIterator.webidl
- [ ] NodeList.webidl
- [ ] Node.webidl
- [ ] NotificationEvent.webidl
- [ ] Notification.webidl
- [ ] NotifyPaintEvent.webidl
- [ ] OfflineAudioCompletionEvent.webidl
- [ ] OfflineAudioContext.webidl
- [ ] OfflineResourceList.webidl
- [ ] OffscreenCanvas.webidl
- [ ] OscillatorNode.webidl
- [ ] PageTransitionEvent.webidl
- [ ] PaintRequestList.webidl
- [ ] PaintRequest.webidl
- [ ] PaintWorkletGlobalScope.webidl
- [ ] PannerNode.webidl
- [ ] ParentNode.webidl
- [ ] ParentSHistory.webidl
- [ ] PaymentAddress.webidl
- [ ] PaymentMethodChangeEvent.webidl
- [ ] PaymentRequestUpdateEvent.webidl
- [ ] PaymentResponse.webidl
- [ ] PeerConnectionImpl.webidl
- [ ] PeerConnectionObserverEnums.webidl
- [ ] PeerConnectionObserver.webidl
- [ ] PerformanceEntryEvent.webidl
- [ ] PerformanceEntry.webidl
- [ ] PerformanceMark.webidl
- [ ] PerformanceMeasure.webidl
- [ ] PerformanceNavigationTiming.webidl
- [ ] PerformanceNavigation.webidl
- [ ] PerformanceObserverEntryList.webidl
- [ ] PerformanceObserver.webidl
- [ ] PerformanceResourceTiming.webidl
- [ ] PerformanceServerTiming.webidl
- [ ] PerformanceTiming.webidl
- [ ] Performance.webidl
- [ ] PeriodicWave.webidl
- [ ] PermissionStatus.webidl
- [ ] Permissions.webidl
- [ ] PluginArray.webidl
- [ ] PluginCrashedEvent.webidl
- [ ] Plugin.webidl
- [ ] PointerEvent.webidl
- [ ] PopStateEvent.webidl
- [ ] PopupBlockedEvent.webidl
- [ ] PositionError.webidl
- [ ] Position.webidl
- [ ] PresentationAvailability.webidl
- [ ] PresentationConnectionAvailableEvent.webidl
- [ ] PresentationConnectionCloseEvent.webidl
- [ ] PresentationConnectionList.webidl
- [ ] PresentationReceiver.webidl
- [ ] PresentationRequest.webidl
- [ ] Presentation.webidl
- [ ] ProcessingInstruction.webidl
- [ ] ProfileTimelineMarker.webidl
- [ ] ProgressEvent.webidl
- [ ] PromiseRejectionEvent.webidl
- [ ] Promise.webidl
- [ ] PushEvent.webidl
- [ ] PushManager.webidl
- [ ] PushMessageData.webidl
- [ ] PushSubscriptionOptions.webidl
- [ ] PushSubscription.webidl
- [ ] RadioNodeList.webidl
- [ ] Range.webidl
- [ ] Request.webidl
- [ ] Response.webidl
- [ ] RTCCertificate.webidl
- [ ] RTCConfiguration.webidl
- [ ] RTCDataChannelEvent.webidl
- [ ] RTCDTMFSender.webidl
- [ ] RTCDTMFToneChangeEvent.webidl
- [ ] RTCIdentityAssertion.webidl
- [ ] RTCIdentityProvider.webidl
- [ ] RTCPeerConnectionIceEvent.webidl
- [ ] RTCPeerConnectionStatic.webidl
- [ ] RTCRtpReceiver.webidl
- [ ] RTCRtpSender.webidl
- [ ] RTCRtpSources.webidl
- [ ] RTCSessionDescription.webidl
- [ ] RTCStatsReport.webidl
- [ ] RTCTrackEvent.webidl
- [ ] ScreenOrientation.webidl
- [ ] Screen.webidl
- [ ] ScriptProcessorNode.webidl
- [ ] ScrollAreaEvent.webidl
- [ ] ScrollBoxObject.webidl
- [ ] ScrollViewChangeEvent.webidl
- [ ] SecurityPolicyViolationEvent.webidl
- [ ] ServiceWorkerContainer.webidl
- [ ] ServiceWorkerGlobalScope.webidl
- [ ] ServiceWorkerRegistration.webidl
- [ ] ServiceWorker.webidl
- [ ] ShadowRoot.webidl
- [ ] SharedWorkerGlobalScope.webidl
- [ ] SharedWorker.webidl
- [ ] SimpleGestureEvent.webidl
- [ ] SocketCommon.webidl
- [ ] SourceBufferList.webidl
- [ ] SourceBuffer.webidl
- [ ] SpeechGrammarList.webidl
- [ ] SpeechGrammar.webidl
- [ ] SpeechRecognitionAlternative.webidl
- [ ] SpeechRecognitionError.webidl
- [ ] SpeechRecognitionEvent.webidl
- [ ] SpeechRecognitionResultList.webidl
- [ ] SpeechRecognitionResult.webidl
- [ ] SpeechRecognition.webidl
- [ ] SpeechSynthesisErrorEvent.webidl
- [ ] SpeechSynthesisVoice.webidl
- [ ] SpeechSynthesis.webidl
- [ ] StereoPannerNode.webidl
- [ ] StorageEvent.webidl
- [ ] StorageManager.webidl
- [ ] StorageType.webidl
- [ ] Storage.webidl
- [ ] StreamFilterDataEvent.webidl
- [ ] StreamFilter.webidl
- [ ] StyleRuleChangeEvent.webidl
- [ ] StyleSheetApplicableStateChangeEvent.webidl
- [ ] StyleSheetChangeEvent.webidl
- [ ] StyleSheetList.webidl
- [ ] StyleSheet.webidl
- [ ] SubtleCrypto.webidl
- [ ] SVGAElement.webidl
- [ ] SVGAngle.webidl
- [ ] SVGAnimatedAngle.webidl
- [ ] SVGAnimatedBoolean.webidl
- [ ] SVGAnimatedEnumeration.webidl
- [ ] SVGAnimatedInteger.webidl
- [ ] SVGAnimatedLengthList.webidl
- [ ] SVGAnimatedLength.webidl
- [ ] SVGAnimatedNumberList.webidl
- [ ] SVGAnimatedNumber.webidl
- [ ] SVGAnimatedPathData.webidl
- [ ] SVGAnimatedPoints.webidl
- [ ] SVGAnimatedPreserveAspectRatio.webidl
- [ ] SVGAnimatedRect.webidl
- [ ] SVGAnimatedString.webidl
- [ ] SVGAnimatedTransformList.webidl
- [ ] SVGAnimateElement.webidl
- [ ] SVGAnimateMotionElement.webidl
- [ ] SVGAnimateTransformElement.webidl
- [ ] SVGAnimationElement.webidl
- [ ] SVGCircleElement.webidl
- [ ] SVGClipPathElement.webidl
- [ ] SVGComponentTransferFunctionElement.webidl
- [ ] SVGDefsElement.webidl
- [ ] SVGDescElement.webidl
- [ ] SVGElement.webidl
- [ ] SVGEllipseElement.webidl
- [ ] SVGFEBlendElement.webidl
- [ ] SVGFEColorMatrixElement.webidl
- [ ] SVGFEComponentTransferElement.webidl
- [ ] SVGFECompositeElement.webidl
- [ ] SVGFEConvolveMatrixElement.webidl
- [ ] SVGFEDiffuseLightingElement.webidl
- [ ] SVGFEDisplacementMapElement.webidl
- [ ] SVGFEDistantLightElement.webidl
- [ ] SVGFEDropShadowElement.webidl
- [ ] SVGFEFloodElement.webidl
- [ ] SVGFEFuncAElement.webidl
- [ ] SVGFEFuncBElement.webidl
- [ ] SVGFEFuncGElement.webidl
- [ ] SVGFEFuncRElement.webidl
- [ ] SVGFEGaussianBlurElement.webidl
- [ ] SVGFEImageElement.webidl
- [ ] SVGFEMergeElement.webidl
- [ ] SVGFEMergeNodeElement.webidl
- [ ] SVGFEMorphologyElement.webidl
- [ ] SVGFEOffsetElement.webidl
- [ ] SVGFEPointLightElement.webidl
- [ ] SVGFESpecularLightingElement.webidl
- [ ] SVGFESpotLightElement.webidl
- [ ] SVGFETileElement.webidl
- [ ] SVGFETurbulenceElement.webidl
- [ ] SVGFilterElement.webidl
- [ ] SVGFilterPrimitiveStandardAttributes.webidl
- [ ] SVGFitToViewBox.webidl
- [ ] SVGForeignObjectElement.webidl
- [ ] SVGGElement.webidl
- [ ] SVGGeometryElement.webidl
- [ ] SVGGradientElement.webidl
- [ ] SVGGraphicsElement.webidl
- [ ] SVGImageElement.webidl
- [ ] SVGLengthList.webidl
- [ ] SVGLength.webidl
- [ ] SVGLinearGradientElement.webidl
- [ ] SVGLineElement.webidl
- [ ] SVGMarkerElement.webidl
- [ ] SVGMaskElement.webidl
- [ ] SVGMatrix.webidl
- [ ] SVGMetadataElement.webidl
- [ ] SVGMPathElement.webidl
- [ ] SVGNumberList.webidl
- [ ] SVGNumber.webidl
- [ ] SVGPathElement.webidl
- [ ] SVGPathSegList.webidl
- [ ] SVGPathSeg.webidl
- [ ] SVGPatternElement.webidl
- [ ] SVGPointList.webidl
- [ ] SVGPoint.webidl
- [ ] SVGPolygonElement.webidl
- [ ] SVGPolylineElement.webidl
- [ ] SVGPreserveAspectRatio.webidl
- [ ] SVGRadialGradientElement.webidl
- [ ] SVGRectElement.webidl
- [ ] SVGRect.webidl
- [ ] SVGScriptElement.webidl
- [ ] SVGSetElement.webidl
- [ ] SVGStopElement.webidl
- [ ] SVGStringList.webidl
- [ ] SVGStyleElement.webidl
- [ ] SVGSVGElement.webidl
- [ ] SVGSwitchElement.webidl
- [ ] SVGSymbolElement.webidl
- [ ] SVGTests.webidl
- [ ] SVGTextContentElement.webidl
- [ ] SVGTextElement.webidl
- [ ] SVGTextPathElement.webidl
- [ ] SVGTextPositioningElement.webidl
- [ ] SVGTitleElement.webidl
- [ ] SVGTransformList.webidl
- [ ] SVGTransform.webidl
- [ ] SVGTSpanElement.webidl
- [ ] SVGUnitTypes.webidl
- [ ] SVGURIReference.webidl
- [ ] SVGUseElement.webidl
- [ ] SVGViewElement.webidl
- [ ] SVGZoomAndPanValues.webidl
- [ ] SVGZoomAndPan.webidl
- [ ] TCPServerSocketEvent.webidl
- [ ] TCPServerSocket.webidl
- [ ] TCPSocketErrorEvent.webidl
- [ ] TCPSocketEvent.webidl
- [ ] TCPSocket.webidl
- [ ] TestInterfaceJSDictionaries.webidl
- [ ] TestInterfaceJSMaplikeSetlikeIterable.webidl
- [ ] TestInterfaceJS.webidl
- [ ] TextClause.webidl
- [ ] TextDecoder.webidl
- [ ] TextEncoder.webidl
- [ ] TextTrackCueList.webidl
- [ ] TextTrackCue.webidl
- [ ] TextTrackList.webidl
- [ ] TextTrack.webidl
- [ ] Text.webidl
- [ ] TimeEvent.webidl
- [ ] TimeRanges.webidl
- [ ] TouchEvent.webidl
- [ ] TouchList.webidl
- [ ] Touch.webidl
- [ ] TrackEvent.webidl
- [ ] TransceiverImpl.webidl
- [ ] TransitionEvent.webidl
- [ ] TreeBoxObject.webidl
- [ ] TreeColumns.webidl
- [ ] TreeColumn.webidl
- [ ] TreeContentView.webidl
- [ ] TreeView.webidl
- [ ] TreeWalker.webidl
- [ ] U2F.webidl
- [ ] UDPMessageEvent.webidl
- [ ] UDPSocket.webidl
- [ ] UIEvent.webidl
- [ ] URLSearchParams.webidl
- [ ] UserProximityEvent.webidl
- [ ] ValidityState.webidl
- [ ] VideoPlaybackQuality.webidl
- [ ] VideoStreamTrack.webidl
- [ ] VideoTrackList.webidl
- [ ] VideoTrack.webidl
- [ ] VRDisplay.webidl
- [ ] VRServiceTest.webidl
- [ ] VTTCue.webidl
- [ ] VTTRegion.webidl
- [ ] WebAuthentication.webidl
- [ ] WebComponents.webidl
- [ ] WebGL2RenderingContext.webidl
- [ ] WebGLContextEvent.webidl
- [ ] WebGLRenderingContext.webidl
- [ ] WebGPUExtras.webidl
- [ ] WebGPU.webidl
- [ ] WebrtcDeprecated.webidl
- [ ] WebrtcGlobalInformation.webidl
- [ ] WheelEvent.webidl
- [ ] WidevineCDMManifest.webidl
- [ ] WindowOrWorkerGlobalScope.webidl
- [ ] WindowRoot.webidl
- [ ] WorkerDebuggerGlobalScope.webidl
- [ ] WorkerGlobalScope.webidl
- [ ] WorkerLocation.webidl
- [ ] WorkerNavigator.webidl
- [ ] Worker.webidl
- [ ] WorkletGlobalScope.webidl
- [ ] Worklet.webidl
- [ ] XMLDocument.webidl
- [ ] XMLHttpRequestEventTarget.webidl
- [ ] XMLHttpRequestUpload.webidl
- [ ] XMLSerializer.webidl
- [ ] XPathEvaluator.webidl
- [ ] XPathExpression.webidl
- [ ] XPathNSResolver.webidl
- [ ] XPathResult.webidl
- [ ] XSLTProcessor.webidl
- [ ] README.md
- [ ] WaveShaperNode.webidl
- [ ] AnimationPlaybackEvent.webidl
- [ ] AnimationTimeline.webidl
- [ ] Animation.webidl
- [ ] DeviceMotionEvent.webidl
- [ ] DeviceOrientationEvent.webidl
- [ ] IDBFileHandle.webidl
- [ ] IDBVersionChangeEvent.webidl
- [ ] PaymentRequest.webidl
- [ ] README.md
- [ ] RTCIceCandidate.webidl
- [ ] RTCRtpTransceiver.webidl
- [ ] SpeechSynthesisEvent.webidl
- [ ] VRDisplayEvent.webidl
- [ ] AudioNode.webidl
- [ ] CanvasRenderingContext2D.webidl
- [ ] DataTransferItemList.webidl
- [ ] DOMMatrix.webidl
- [ ] FormData.webidl
- [ ] IDBKeyRange.webidl
- [ ] ImageData.webidl
- [ ] MediaStream.webidl
- [ ] PeerConnectionImplEnums.webidl
- [ ] PresentationConnection.webidl
- [ ] README.md
- [ ] RTCDataChannel.webidl
- [ ] RTCPeerConnection.webidl
- [ ] Selection.webidl
- [ ] SpeechSynthesisUtterance.webidl
- [ ] TestFunctions.webidl
- [ ] URL.webidl
- [ ] WebKitCSSMatrix.webidl
- [ ] WebSocket.webidl
- [ ] Window.webidl
- [ ] XMLHttpRequest.webidl

View File

@ -1,4 +1,5 @@
extern crate env_logger; extern crate env_logger;
#[macro_use]
extern crate failure; extern crate failure;
extern crate wasm_bindgen_webidl; extern crate wasm_bindgen_webidl;
extern crate sourcefile; extern crate sourcefile;
@ -59,12 +60,19 @@ fn try_main() -> Result<(), failure::Error> {
}; };
let out_dir = env::var("OUT_DIR").context("reading OUT_DIR environment variable")?; let out_dir = env::var("OUT_DIR").context("reading OUT_DIR environment variable")?;
let mut out_file = fs::File::create(path::Path::new(&out_dir).join("bindings.rs")) let out_file_path = path::Path::new(&out_dir).join("bindings.rs");
let mut out_file = fs::File::create(&out_file_path)
.context("creating output bindings file")?; .context("creating output bindings file")?;
out_file out_file
.write_all(bindings.as_bytes()) .write_all(bindings.as_bytes())
.context("writing bindings to output file")?; .context("writing bindings to output file")?;
// run rustfmt on the generated file - really handy for debugging
//if ! process::Command::new("rustfmt").arg(&out_file_path).status()
// .context("running rustfmt")?.success() {
// return Err(format_err!("rustfmt failed to format {}", out_file_path.display()));
//}
Ok(()) Ok(())
} }

View File

@ -10,7 +10,8 @@
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-storage // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-storage
interface Principal; // invalid widl
// interface Principal;
[Exposed=(Window,Worker), [Exposed=(Window,Worker),
ChromeConstructor(CacheStorageNamespace namespace, Principal principal), ChromeConstructor(CacheStorageNamespace namespace, Principal principal),

View File

@ -4,7 +4,8 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. * You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
interface nsISHistory; // invalid widl
///interface nsISHistory;
/** /**
* The ChildSHistory interface represents the child side of a browsing * The ChildSHistory interface represents the child side of a browsing

View File

@ -72,8 +72,9 @@ namespace console {
[UseCounter] [UseCounter]
void profileEnd(any... data); void profileEnd(any... data);
[ChromeOnly] // invalid widl
const boolean IS_NATIVE_CONSOLE = true; // [ChromeOnly]
// const boolean IS_NATIVE_CONSOLE = true;
[ChromeOnly, NewObject] [ChromeOnly, NewObject]
ConsoleInstance createInstance(optional ConsoleInstanceOptions options); ConsoleInstance createInstance(optional ConsoleInstanceOptions options);

View File

@ -13,7 +13,8 @@
// This is the WebIDL version of nsIException. This is mostly legacy stuff. // This is the WebIDL version of nsIException. This is mostly legacy stuff.
interface StackFrame; // invalid widl
//interface StackFrame;
[NoInterfaceObject, [NoInterfaceObject,
Exposed=(Window,Worker,System)] Exposed=(Window,Worker,System)]

View File

@ -6,9 +6,10 @@
* http://domparsing.spec.whatwg.org/#the-domparser-interface * http://domparsing.spec.whatwg.org/#the-domparser-interface
*/ */
interface Principal; // invalid widl
interface URI; // interface Principal;
interface InputStream; // interface URI;
// interface InputStream;
enum SupportedType { enum SupportedType {
"text/html", "text/html",

Some files were not shown because too many files have changed in this diff Show More