Skip to content

Instantly share code, notes, and snippets.

@jayjayjpg
Created August 30, 2022 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayjayjpg/42df0f47a3470b5853ba6dfa363a137f to your computer and use it in GitHub Desktop.
Save jayjayjpg/42df0f47a3470b5853ba6dfa363a137f to your computer and use it in GitHub Desktop.
test-user-interactions-in-js-apps-accurately-with-emulated-events-example-1
{{! EmberJS }}
{{! file-upload/app/components/upload.hbs }}
<section class="my-file-upload-component">
<h2>{{@title}}</h2>
<p>{{@description}}</p>
<button type="button" {{on "click" this.startUpload}}>
Browse file
</button>
<label for="text-field">{{@label}}</label>
<textarea
id="text-field"
value={{this.fileContent}}
placeholder="Paste the content of your file here"
/>
<input
type="file"
id="file-upload-field"
{{on "change" this.handleFileInput}}
/>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment