Skip to content

Commit

Permalink
Merge pull request #34 from sorvell/master
Browse files Browse the repository at this point in the history
added g-page component
  • Loading branch information
frankiefu committed Nov 6, 2012
2 parents fe450af + 1bfc113 commit 73d5ef5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/g-page.html
@@ -0,0 +1,34 @@
<!--
/*
* Copyright 2012 The Toolkitchen Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
-->
<element name="g-page">
<link rel="components" href="g-component.html">
<template>
<content></content>
</template>
<script>
this.component({
shadowRootCreated: function() {
this.makeFittable();
},
prototype: {
makeFittable: function() {
var sheet = document.querySelector('style[fittable]');
if (!sheet) {
sheet = document.createElement('style');
sheet.setAttribute('fittable', '');
sheet.textContent = 'html, body { ' +
'height: 100%;' +
'margin: 0;' +
'}';
document.head.appendChild(sheet);
}
}
}
});
</script>
</element>

0 comments on commit 73d5ef5

Please sign in to comment.