Created
February 24, 2014 20:54
-
-
Save digilord/9196826 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<link rel="import" href="../bower_components/polymer/polymer.html"> | |
<polymer-element name="polymer-file-upload" attributes=""> | |
<template> | |
<style> | |
/* styles for the custom element itself - lowest specificity */ | |
:host { display: block; } | |
/* | |
style if an ancestor has the different class | |
:host(.different) { } | |
*/ | |
</style> | |
<input id="FileUpload" type="file" on-change="{{changeHandler}}"> | |
</template> | |
<script> | |
Polymer('polymer-file-upload', { | |
//applyAuthorStyles: true, | |
//resetStyleInheritance: true, | |
changeHandler: function(event){ | |
console.log(event); | |
}, | |
// element is fully prepared | |
ready: function(){ | |
var fileUpload = this.$.FileUpload; | |
}, | |
// instance of the element is created | |
created: function() { }, | |
// instance was inserted into the document | |
enteredView: function() { }, | |
// instance was removed from the document | |
leftView: function() { }, | |
// attribute added, removed or updated | |
attributeChanged: function(attrName, oldVal, newVal) { | |
console.log(attrName); | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment