Skip to content

Commit 572ecd2

Browse files
committed
polymer updated to v0.3.0 + small refactoring
1 parent 3de3332 commit 572ecd2

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-gist",
3-
"version": "0.0.9",
3+
"version": "0.1.0",
44
"authors": [
55
"Dmitry Maslov <[email protected]>"
66
],
@@ -22,6 +22,6 @@
2222
"tests"
2323
],
2424
"dependencies": {
25-
"polymer": "0.2.3"
25+
"polymer": "Polymer/polymer#~0.3.0"
2626
}
2727
}

src/github-gist.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<template></template>
33
<script>
44
Polymer('github-gist', {
5-
gistid: '',
6-
styleEl: '',
7-
gistEl: '',
8-
scriptEl: '',
5+
gistid: null,
6+
styleEl: null,
7+
gistEl: null,
8+
scriptEl: null,
99

1010
ready: function(){
1111
this.createElements();
@@ -54,7 +54,7 @@
5454
},
5555

5656
applyScript: function(scrString){
57-
var eventCallback = function(){
57+
var errorCallback = function(){
5858
var htmlString = '<p>Loading gist failed..</p>';
5959
this.applyGist(htmlString);
6060
}.bind(this);
@@ -68,10 +68,10 @@
6868

6969
if(window.addEventListener){
7070
this.scriptEl.removeEventListener('error');
71-
this.scriptEl.addEventListener('error', eventCallback);
71+
this.scriptEl.addEventListener('error', errorCallback);
7272
}
7373
else{
74-
this.scriptEl.attachEvent('onerror', eventCallback);
74+
this.scriptEl.attachEvent('onerror', errorCallback);
7575
this.scriptEl.detachEvent('onerror');
7676
}
7777
},

0 commit comments

Comments
 (0)