-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the GWT game file import code to use addEventListener instead…
… of onchange.
- Loading branch information
1 parent
df2239a
commit 942cd84
Showing
1 changed file
with
3 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -280,11 +280,8 @@ private final native void showHtmlOpenFileDialog(String type, GwtOpenFileResults | |
console.log('Finished creating input element of type file'); | ||
// The onchange event occurs after a file is chosen. | ||
fileInputElem.onchange = function(event) { | ||
console.log('File input element onchange event triggered.'); | ||
console.log('The event object is: ' + event); | ||
// The change event occurs after a file is chosen. | ||
fileInputElem.addEventListener("change", function(event) { | ||
if (this.files.length === 0) { | ||
console.log('No files selected for import'); | ||
|
@@ -320,7 +317,7 @@ private final native void showHtmlOpenFileDialog(String type, GwtOpenFileResults | |
[email protected]::onFileResultsReady([Lcom/agifans/agile/gwt/GwtOpenFileResult;)(results); | ||
}); | ||
} | ||
}; | ||
}); | ||
// Trigger the display of the open file dialog. | ||
fileInputElem.click(); | ||
|