Created
April 6, 2015 15:16
-
-
Save ToJans/27c525977aefb04923b5 to your computer and use it in GitHub Desktop.
I don't understand why something this simple doesn't work (I get back undefined is not a function)
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Editor</title> | |
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script> | |
<link rel="import" href="elements/user-gravatar.html" /> | |
</head> | |
<body> | |
<user-gravatar email="[email protected]"/> | |
</body> | |
</html> |
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="user-gravatar" attributes="email"> | |
<template> | |
<img src="https://secure.gravatar.com/avatar/{{gid}}" /> | |
</template> | |
<script> | |
Polymer('user-gravatar', { | |
ready: function() { | |
this.gid = md5(this.email); | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where does the md5() function come from? I guess that's the one that gives an "undefined is not a function"?