mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: es6ify 'Breaking Changes' and 'File' API pages (#15507)
* docs: apply arrow functions to app.makeSingleInstance example * docs: apply arrow functions to session docs * docs: change normal to arrow functions in File object docs
This commit is contained in:
committed by
Samuel Attard
parent
d561c5531b
commit
cfbea4a0e3
@@ -15,15 +15,15 @@ Example of getting a real path from a dragged-onto-the-app file:
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('drop', function (e) {
|
||||
document.addEventListener('drop', (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
for (let f of e.dataTransfer.files) {
|
||||
|
||||
for (const f of e.dataTransfer.files) {
|
||||
console.log('File(s) you dragged here: ', f.path)
|
||||
}
|
||||
});
|
||||
document.addEventListener('dragover', function (e) {
|
||||
document.addEventListener('dragover', (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user