Merge pull request #7113 from electron/const-default-app

Use const instead of var in default app
This commit is contained in:
Kevin Sawicki 2016-09-06 13:42:36 -07:00 committed by GitHub
commit 540b1960a8

View file

@ -116,8 +116,8 @@
<script> <script>
const {remote, shell} = require('electron'); const {remote, shell} = require('electron');
var execPath = remote.process.execPath; const execPath = remote.process.execPath;
var command = execPath + ' path-to-your-app'; const command = execPath + ' path-to-your-app';
document.onclick = function(e) { document.onclick = function(e) {
e.preventDefault(); e.preventDefault();
@ -195,7 +195,7 @@
</div> </div>
<script> <script>
var holder = document.getElementById('holder'); const holder = document.getElementById('holder');
holder.ondragover = function () { holder.ondragover = function () {
this.className = 'hover'; this.className = 'hover';
return false; return false;
@ -208,7 +208,7 @@
this.className = ''; this.className = '';
e.preventDefault(); e.preventDefault();
var file = e.dataTransfer.files[0]; const file = e.dataTransfer.files[0];
require('child_process').execFile(execPath, [file.path], { require('child_process').execFile(execPath, [file.path], {
detached: true, stdio: 'ignore' detached: true, stdio: 'ignore'
}).unref(); }).unref();