File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,9 @@ Or alternatively, choose which components you want to include:
107107In your application code, use the ` loadImage() ` function like this:
108108
109109``` js
110- document .getElementById (' file-input' ).onchange = function (e ) {
110+ document .getElementById (' file-input' ).onchange = function () {
111111 loadImage (
112- e . target .files [0 ],
112+ this .files [0 ],
113113 function (img ) {
114114 document .body .appendChild (img)
115115 },
@@ -123,8 +123,8 @@ Or using the
123123based API like this:
124124
125125``` js
126- document .getElementById (' file-input' ).onchange = function (e ) {
127- loadImage (e . target .files [0 ], { maxWidth: 600 }).then (function (data ) {
126+ document .getElementById (' file-input' ).onchange = function () {
127+ loadImage (this .files [0 ], { maxWidth: 600 }).then (function (data ) {
128128 document .body .appendChild (data .image )
129129 })
130130}
You can’t perform that action at this time.
0 commit comments