Comments (2)
I've fixed the ReadableStreamDefaultController
case in #34690.
Haven't looked at ReadableStreamDefaultController.enqueue
or WritableStreamDefaultController
FYI @ragul1697 Best not to direct tag a reviewer until someone accepts assignment.
from content.
@Josh-Cena Hey, I have tried to create a scenario where ReadableStreamDefaultController
is already closed and throws error on calling close()
again.
<button class="toggle">Close Controller</button>
let closeController = false;
toggle.addEventListener('click', () => {
closeController = !closeController;
});
// Add the string to the stream
if (!closeController) {
controller.enqueue(string);
}
else {
clearInterval(interval);
controller.close();
}
Here controller
becomes closed when the user clicks Close Controller
button. And when the user tries to close controller and get data by clicking Stop string generation
an error is thrown.
Uncaught TypeError: Failed to execute 'close' on 'ReadableStreamDefaultController': Cannot close a readable stream that has already been requested to be closed
from content.
Related Issues (20)
- Typo: React interactivity: Editing, filtering, conditional rendering HOT 1
- Missing autocomplete contact token values
- Enhancement: Open external links in a new tab HOT 3
- Behavior of colors in gradient-images differes between browsers HOT 5
- Descriptions of orientation values missing HOT 2
- IsStandaloneContent does not work with `display: fullscreen` in Chrome Android
- deleteFromDocument deletes more than just text HOT 1
- Only the request to access the Notifications API is restricted to user interaction HOT 2
- Outdated links to dev.opera articles are redirected to blogs.opera.com/news
- Wrong mention of inline layers in example HOT 2
- Summary paragraph for HTTP status code 412 refers to If-None-Match but this should be If-Match HOT 2
- NotFoundError: No Characteristics matching UUID with Chrome for Android HOT 1
- Playground example not working in deleteFromDocument page HOT 2
- firstInstance only supported if requested, otherwise only works if firstInstance is 0
- [Spam]
- minor issue with Active learning: More color choices HOT 1
- Wrong return value of `queryPermission` HOT 4
- Interactive explorer of Location anatomy clips last "l" of "protocol" HOT 3
- Element.querySelectorAll() examples: HTML & JS don't correspond HOT 1
- Add layer() function page and define `layer` keyterm.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from content.