Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
Consistent strict behavior with IIFEs
Browse files Browse the repository at this point in the history
  • Loading branch information
robdodson committed Jul 27, 2014
1 parent a21a7ef commit 3074cc8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
11 changes: 8 additions & 3 deletions app/templates/app/yo-greeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ <h1>{{ greeting }}, {{ greeting }}!</h1>
<input type="text" value="{{ greeting }}">
</template>
<script>
Polymer({
greeting : '\'Allo'
});
(function () {
'use strict';

Polymer({
greeting : '\'Allo'
});

})();
</script>
</polymer-element>
27 changes: 16 additions & 11 deletions app/templates/app/yo-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@
</ul>
</template>
<script>
Polymer({
ready: function() {
this.items = [
'HTML5 Boilerplate',
'Web Component Polyfills',
<% if (includeCore) { %>'Core Elements', <% } %>
<% if (includePaper) { %>'Paper Elements', <% } %>
'Polymer'
];
}
});
(function () {
'use strict';

Polymer({
ready: function() {
this.items = [
'HTML5 Boilerplate',
'Web Component Polyfills',
<% if (includeCore) { %>'Core Elements', <% } %>
<% if (includePaper) { %>'Paper Elements', <% } %>
'Polymer'
];
}
});

})();
</script>
</polymer-element>
9 changes: 7 additions & 2 deletions el/templates/_element.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
</style>
</template>
<script>
Polymer({
(function () {
'use strict';

});
Polymer({
// define element prototype here
});

})();
</script>
</polymer-element>

0 comments on commit 3074cc8

Please sign in to comment.