I just looked over this nice presentation:
http://html5-demos.appspot.com/static/polymer/index.html#24
I have some questions about slide 24 "Everything is an element, read
files...using DOM".
Here is the code from the slide:
<polymer-file readas="dataurl"></polymer-file>
var pFile = document.querySelector('polymer-file');
pFile.addEventListener('polymer-result', function(e) {
console.log(this.result);
});
pFile.blob = new Blob(['abc'], {type: 'text/plain'}); // Set the file to
read
pFile.read();
This seems like madness; why use an *element* to read a file at all? Reading
a file is fundamentally an action. Wrapping up an action in a structural
element (intended for a UI) seems ill-conceived.
Am I missing something? Perhaps polymer-file is *only*intended to represent
a file upload UI component?
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/2ec8f0ed-4515-4749-9578-5750dab21a28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.