Skip to content

Use Web IDL's new record type - #412

Merged
annevk merged 5 commits into
whatwg:masterfrom
TimothyGu:record-type
Nov 23, 2016
Merged

annevk merged 5 commits into
whatwg:masterfrom
TimothyGu:record-type

Conversation

@TimothyGu

Copy link
Copy Markdown
Member

This is my first PR here, so please point out if I'm doing anything wrong.

Closes #164.

@annevk annevk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this looks great. Thank you for working on this. I have a couple nits and we need some tooling changes that I requested here: plinss/widlparser#18.

I'd also appreciate it if you could add your name to the Acknowledgments section, but no worries if you don't want to.

Comment thread fetch.bs Outdated

<p>See <a href=https://github.com/whatwg/fetch/issues/164>issue #164</a> for discussion.
</div>
<pre data-no-idl class=idl>typedef (Headers or sequence&lt;sequence&lt;ByteString>> or record&lt;ByteString, ByteString>) <dfn id=headersinit typedef export>HeadersInit</dfn>;</pre>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The "data-no-idl" can be removed now this is all part of IDL.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That and the manual <dfn> removed.

Comment thread fetch.bs

<pre>
var meta = { "Content-Type": "text/xml", "Breaking-Bad": "&lt;3" }
new Headers(meta)</pre>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer to keep this example. Change the class on the <div> to example and change the opening paragraph to something like: Constructing a {{Headers}} object is fairly straightforward:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Kept and added to it example of creating an object with the sequence syntax.

Comment thread fetch.bs Outdated
<li><p><a lt=append for=Headers>Append</a>
<var>header</var>'s key/<var>header</var>'s value to
<var>key</var>/<var>value</var> to
<var>headers</var>. Rethrow any exception.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this is now the only substep you should just inline it in the paragraph that introduces it. "then for each mapping ... in object, append ..."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

Comment thread fetch.bs

<ol>
<li><p>Set <var>header</var>'s key to <var>header</var>'s key,
<a spec=webidl>converted to ByteString</a>.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this is removed we can remove the corresponding line in class=anchors.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed, but I added a reference to the definition of a record mapping.

@annevk

annevk commented Nov 8, 2016

Copy link
Copy Markdown
Member

Thanks for fixing the IDL parser issue. Next up is speced/bikeshed#864 and then we can move on here. 😊

@annevk

annevk commented Nov 10, 2016

Copy link
Copy Markdown
Member

Found one more issue that needs figuring out: whatwg/webidl#233. Sorry about that. This one has quite a few dependencies. 😊

Comment thread fetch.bs Outdated
<pre class=anchors>
url:https://xhr.spec.whatwg.org/#concept-formdata-entry;spec:XHR;type:dfn;text:entries
url:https://heycam.github.io/webidl/#es-ByteString;type:dfn;text:converted to ByteString;spec:WEBIDL
url:https://heycam.github.io/webidl/#record-mappings;type:dfn;text:mapping;spec:WEBIDL

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These are not picked-up by Shepherd yet?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"mappings" should soon be picked up per the change to IDL today. My plan was on updating this PR after that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Got it.

@annevk

annevk commented Nov 15, 2016

Copy link
Copy Markdown
Member

I forgot that I wanted to link record too and that IDL does not export that yet. So I guess this needs to wait yet another day.

@annevk

annevk commented Nov 15, 2016

Copy link
Copy Markdown
Member

Sorry about that. I did push my final nits. Would appreciate if you could look those over.

@annevk
annevk merged commit 579e363 into whatwg:master Nov 23, 2016
@annevk

annevk commented Nov 23, 2016

Copy link
Copy Markdown
Member

Thanks @TimothyGu, finally all the dependencies are resolved and this could land.

@TimothyGu
TimothyGu deleted the record-type branch November 23, 2016 16:01
@TimothyGu

Copy link
Copy Markdown
Member Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants