Created
February 24, 2014 20:43
-
-
Save digilord/9196631 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"> | |
</template> | |
<script> | |
Polymer('polymer-file-upload', { | |
//applyAuthorStyles: true, | |
//resetStyleInheritance: true, | |
// element is fully prepared | |
ready: function(){ | |
var fileUpload = document.getElementById("FileUpload"); | |
console.log(fileUpload); | |
}, | |
// instance of the element is created | |
created: function() { | |
var fileUpload = document.getElementById("FileUpload"); | |
console.log(fileUpload); | |
}, | |
// instance was inserted into the document | |
enteredView: function() { | |
var fileUpload = document.getElementById("FileUpload"); | |
console.log(fileUpload); | |
}, | |
// instance was removed from the document | |
leftView: function() { }, | |
// attribute added, removed or updated | |
attributeChanged: function(attrName, oldVal, newVal) { | |
console.log(attrName); | |
} | |
}); | |
document.addEventListener('WebComponentsReady', function() { | |
// Perform some behaviour | |
var fileUpload = document.getElementById("FileUpload"); | |
// fileUpload.addEventListener("change", function(event){ | |
// console.log(event); | |
// }); | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment