commit
39ea587bf5
2 changed files with 3 additions and 3 deletions
|
@ -4,9 +4,9 @@ Drag'n'Drop is a great interface solution. Taking something, dragging and droppi
|
|||
|
||||
In the modern HTML standard there's a [section about Drag Events](https://html.spec.whatwg.org/multipage/interaction.html#dnd).
|
||||
|
||||
They are interesting, because they allow to solve simple tasks easily, and also allow to handle drag'n'drop of "external" files into the browser. So we can take a file in the OS file-manager and drop it into the browser window. Then JavaScript gains access to its contents.
|
||||
They are interesting because they allow to solve simple tasks easily, and also allow to handle drag'n'drop of "external" files into the browser. So we can take a file in the OS file-manager and drop it into the browser window. Then JavaScript gains access to its contents.
|
||||
|
||||
But native Drag Events also have limitations. For instance, we can limit dragging by a certain area. Also we can't make it "horizontal" or "vertical" only. There are other drag'n'drop tasks that can't be implemented using that API.
|
||||
But native Drag Events also have limitations. For instance, we can't limit dragging by a certain area. Also we can't make it "horizontal" or "vertical" only. There are other drag'n'drop tasks that can't be implemented using that API.
|
||||
|
||||
So here we'll see how to implement Drag'n'Drop using mouse events. Not that hard either.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
The `fetch` method allows to track download progress.
|
||||
|
||||
Please note: there's currently no way for fetch to track upload progress. For that purpose, please use [XMLHttpRequest](info:xmlhttprequest).
|
||||
Please note: there's currently no way for `fetch` to track upload progress. For that purpose, please use [XMLHttpRequest](info:xmlhttprequest).
|
||||
|
||||
To track download progress, we can use `response.body` property. It's a "readable stream" -- a special object that provides body chunk-by-chunk, as it comes, so we can see how much is available at the moment.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue