Skip to content
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

Add AbstractRange and StaticRange interfaces #4221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

behrenle
Copy link

This pull request adds support for the AbstractRange and StaticRange interfaces to wasm-bindgen, enabling Rust developers to interact with these DOM range objects for improved web API compatibility.

Comment on lines +14 to +21
[Throws]
readonly attribute Node startContainer;
[Throws]
readonly attribute unsigned long startOffset;
[Throws]
readonly attribute Node endContainer;
[Throws]
readonly attribute unsigned long endOffset;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find anything in the specification saying that this could throw.
I assume you simply copied this from the Firefox webidl directory, but we tend to follow the specification as close as possible.

Let me know if you have different information.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOL missing.

@@ -10,10 +10,10 @@
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*/
*/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOL missing.


[Exposed=Window]
interface StaticRange : AbstractRange {
constructor(StaticRangeInit init);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constructor(StaticRangeInit init);
[Throws] constructor(StaticRangeInit init);

Constructors are marked as throwing by default, but just in case we want to change this in the future.

Comment on lines +17 to +21
* Added bindings for `StaticRange`.
[#4221](https://github.com/rustwasm/wasm-bindgen/pull/4221)

* Added bindings for `AbstractRange`.
[#4221](https://github.com/rustwasm/wasm-bindgen/pull/4221)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets combine those.

@daxpedda daxpedda added the waiting for author Waiting for author to respond label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Waiting for author to respond
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants