Fix typos, add more files

This commit is contained in:
Plusb Preco 2015-06-26 02:32:51 +09:00
parent bf5b084945
commit ebb031dafe
45 changed files with 3450 additions and 239 deletions

View file

@ -0,0 +1,30 @@
# `File` object
The DOM's File interface provides abstraction around native files, in order to
let users work on native files directly with HTML5 file API, Electron has
added a `path` attribute to `File` interface which exposes the file's real path
on filesystem.
Example on getting real path of a dragged file:
```html
<div id="holder">
Drag your file here
</div>
<script>
var holder = document.getElementById('holder');
holder.ondragover = function () {
return false;
};
holder.ondragleave = holder.ondragend = function () {
return false;
};
holder.ondrop = function (e) {
e.preventDefault();
var file = e.dataTransfer.files[0];
console.log('File you dragged here is', file.path);
return false;
};
</script>
```