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

Update index.bs #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update index.bs #5

wants to merge 1 commit into from

Conversation

guest271314
Copy link

@guest271314 guest271314 commented Oct 4, 2019

Punctuation (space) before "()". Links to readable, writable, TypeError. Add link to https://ricea.github.io/compression/#compressionstream-format at GitHub page.


Preview | Diff

Punctuation (space) before "(<text>)". Links to readable, writable, TypeError.
@guest271314
Copy link
Author

It is not a TransformStream, though it has the same interface and it delegates to one.

...

An object that includes GenericTransformStream has an associated transform of type TransformStream.

is not entirely clear. An entire write-up could possibly be devoted to the concept of GenericTransformStream.

Copy link
Collaborator

@ricea ricea left a comment

Choose a reason for hiding this comment

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

The GenericTransformStream definition is copied from the Encoding Standard (https://encoding.spec.whatwg.org/#interface-mixin-generictransformstream). I intend to eventually move it to a common location in the streams standard, once that has switched to WebIDL.

@@ -82,9 +82,9 @@ An object that includes {{GenericTransformStream}} has an associated <dfn>transf
## Attributes ## {#outgoing-stream-attributes}

: <dfn attribute for="GenericTransformStream">readable</dfn>
:: The `readable` attribute's getter, when invoked, must return this object's transform \[[readable]].
:: The `readable` attribute's getter, when invoked, must return this object's transform \[[readable](https://streams.spec.whatwg.org/#rs-class)].
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't usually link to slots. If we did, I think the link should go to https://streams.spec.whatwg.org/#ts-internal-slots.

Also, since it is a slot, it needs double [[]] square brackets.

The {{CompressionStream}}(format) constructor, when invoked, must run these steps:
1. If <dfn for=CompressionStream>format</dfn> is unsupported in CompressionStream, then throw a TypeError.
The {{CompressionStream}} (format) constructor, when invoked, must run these steps:
1. If <dfn for=CompressionStream>format</dfn> is unsupported in CompressionStream, then throw a [TypeError](https://www.ecma-international.org/ecma-262/6.0/#sec-native-error-types-used-in-this-standard-typeerror).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think Bikeshed can auto-link TypeError if we write it like {{TypeError}}. Also, I think it's probably preferable to import it from WebIDL rather than ECMASCRIPT (at least, that it what the encoding standard does).

1. Let *cs* be a new CompressionStream object.
1. Set *cs*'s *format* to <a for=CompressionStream>format</a>.
1. Let *startAlgorithm* be an algorithm that takes no arguments and returns nothing.
1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the <a>compress and enqueue a chunk</a> algorithm with *cs* and *chunk*.
1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the <a>compress flush and enqueue</a> algorithm with *cs*.
1. Let *transform* be the result of calling <a abstract-op>CreateTransformStream</a>(*startAlgorithm*, *transformAlgorithm*, *flushAlgorithm*).
1. Let *transform* be the result of calling <a abstract-op>CreateTransformStream</a> (*startAlgorithm*, *transformAlgorithm*, *flushAlgorithm*).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you sure we should have a space before ()? The other standards I work on (Streams, Encoding and Fetch do not put a space before the parameters.

@guest271314
Copy link
Author

Is your interpretation that the document is true and correct as is and that this PR is not necessary?

@ricea
Copy link
Collaborator

ricea commented Oct 8, 2019

I think linkifying TypeError is good. Linkifying references to internal slots seems difficult, and I'm not sure it's worth it. I'm used to the style of not having a space before (), but I'm prepared to change my mind if having spaces there would fit better with other specifications.

I'm sorry I created the impression that your contributions were not valued. The spec definitely has flaws that need addressing.

@yoavweiss yoavweiss changed the base branch from master to main March 5, 2021 21:46
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.

2 participants