-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out how to support interfaces with NoInterfaceObject
attribute
#893
Labels
frontend:webidl
Issues related to the WebIDL frontend to wasm-bindgen
web-sys
Issues related to the `web-sys` crate
Comments
fitzgen
added
frontend:webidl
Issues related to the WebIDL frontend to wasm-bindgen
web-sys
Issues related to the `web-sys` crate
labels
Sep 26, 2018
This was referenced Apr 3, 2019
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Apr 12, 2019
This commit enables `[NoInterfaceObject]` annotated interfaces in `web-sys`. The `NoInterfaceObject` attribute means that there's not actually a JS class for the object, but all of its properties and such can still be accessed structually and invoked. This should help provide more bindings for some more common types on the web! Note that this builds on recent features to ensure that `dyn_into` and friends always fail for `NoInterfaceObject` objects because they don't actually have a class. Closes rustwasm#893 Closes rustwasm#1257 Closes rustwasm#1315
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Apr 15, 2019
This commit enables `[NoInterfaceObject]` annotated interfaces in `web-sys`. The `NoInterfaceObject` attribute means that there's not actually a JS class for the object, but all of its properties and such can still be accessed structually and invoked. This should help provide more bindings for some more common types on the web! Note that this builds on recent features to ensure that `dyn_into` and friends always fail for `NoInterfaceObject` objects because they don't actually have a class. Closes rustwasm#893 Closes rustwasm#1257 Closes rustwasm#1315
Any chance of getting a new release cut sometime soon? I've been chomping at the bit for this change. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
frontend:webidl
Issues related to the WebIDL frontend to wasm-bindgen
web-sys
Issues related to the `web-sys` crate
Right now, we completely skip generating code for any interface that is marked
[NoInterfaceObject]
. I think we might want to do something like:structural
, since we don't ahve the prototype until we get an instanceJsCast::is_instance_of
always return false for them, because we don't have access to the constructor without getting an instancecc @alexcrichton @afdw
Here are the 71 interfaces with
[NoInterfaceObject]
in our webidlsANGLE_instanced_arrays
Coordinates
DeviceAcceleration
DeviceRotationRate
Exception
EXT_blend_minmax
EXT_color_buffer_float
EXT_color_buffer_half_float
EXT_disjoint_timer_query
External
EXT_frag_depth
EXT_shader_texture_lod
EXT_sRGB
EXT_texture_filter_anisotropic
FontFaceSetIterator
Geolocation
GetUserMediaRequest
HTMLHyperlinkElementUtils
ImageCaptureError
IntlUtils
ListBoxObject
MediaStreamError
MOZ_debug
NavigatorAutomationInformation
OES_element_index_uint
OES_standard_derivatives
OES_texture_float
OES_texture_float_linear
OES_texture_half_float
OES_texture_half_float_linear
OES_vertex_array_object
Position
PositionError
PromiseNativeHandler
RTCIdentityProviderRegistrar
ScrollBoxObject
SVGPathSeg
SVGPathSegArcAbs
SVGPathSegArcRel
SVGPathSegClosePath
SVGPathSegCurvetoCubicAbs
SVGPathSegCurvetoCubicRel
SVGPathSegCurvetoCubicSmoothAbs
SVGPathSegCurvetoCubicSmoothRel
SVGPathSegCurvetoQuadraticAbs
SVGPathSegCurvetoQuadraticRel
SVGPathSegCurvetoQuadraticSmoothAbs
SVGPathSegCurvetoQuadraticSmoothRel
SVGPathSegLinetoAbs
SVGPathSegLinetoHorizontalAbs
SVGPathSegLinetoHorizontalRel
SVGPathSegLinetoRel
SVGPathSegLinetoVerticalAbs
SVGPathSegLinetoVerticalRel
SVGPathSegMovetoAbs
SVGPathSegMovetoRel
TreeBoxObject
TreeView
WEBGL_color_buffer_float
WEBGL_compressed_texture_astc
WEBGL_compressed_texture_atc
WEBGL_compressed_texture_etc
WEBGL_compressed_texture_etc1
WEBGL_compressed_texture_pvrtc
WEBGL_compressed_texture_s3tc
WEBGL_compressed_texture_s3tc_srgb
WEBGL_debug_renderer_info
WEBGL_debug_shaders
WEBGL_depth_texture
WEBGL_draw_buffers
WEBGL_lose_context
The text was updated successfully, but these errors were encountered: