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

Implement WebIDL sequence arguments correctly #9290

Closed
Ms2ger opened this issue Jan 13, 2016 · 5 comments
Closed

Implement WebIDL sequence arguments correctly #9290

Ms2ger opened this issue Jan 13, 2016 · 5 comments

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Jan 13, 2016

We do something silly right now with arrays rather than with Symbol.iterator, as the spec says.

See servo/rust-mozjs#226, #544, #9056.

@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Jan 13, 2016

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

@emilio @frewsxcv Was this fixed in the end?

@saschanaz
Copy link
Contributor

@saschanaz saschanaz commented Oct 16, 2019

I don't believe so: https://github.com/servo/rust-mozjs/blob/3de4ff3d52361a47a17e3b4fcb02c779b99d93d4/src/conversions.rs#L611-L625 vs. https://heycam.github.io/webidl/#es-sequence

That code seems to internally use Symbole.iterator and also match the corresponding Gecko code.

Edit: And it in fact supports Symbol.iterator.

const params = new URLSearchParams({
  *[Symbol.iterator]() {
    yield {
      *[Symbol.iterator]() {
        yield "ABC";
        yield "BCD";
      }
    };
  }
}).toString();
// returns "ABC=BCD" as expected
@jdm
Copy link
Member

@jdm jdm commented Oct 16, 2019

I guess we're done here!

@jdm jdm closed this Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.