Skip to content

Commit

Permalink
Merge pull request #232 from chrisbu/polymer-register-fixes
Browse files Browse the repository at this point in the history
Fixes for some of the workbench samples
  • Loading branch information
dfreedm committed Aug 12, 2013
2 parents 60247f5 + 2e95d97 commit 51e386e
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 39 deletions.
12 changes: 6 additions & 6 deletions workbench/events/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h4>Custom element using declarative events</h4>
without event path, only host event fires.)</div>
</x-basic>

<element name="x-basic" on-click="hostClickHandler">
<polymer-element name="x-basic" on-click="hostClickHandler">
<template>
<style>
@host {
Expand All @@ -43,7 +43,7 @@ <h4>Custom element using declarative events</h4>
</div>
</template>
<script>
Polymer.register(this, {
Polymer('x-basic', {
hostClickHandler: function(inEvent, inDetail, inSender) {
console.log('clicked on host!', this.localName, inEvent);
},
Expand All @@ -55,13 +55,13 @@ <h4>Custom element using declarative events</h4>
}
});
</script>
</element>
</polymer-element>

<h4>Composed custom elements using declarative events</h4>

<x-simple-composed></x-simple-composed>

<element name="x-simple-composed" on-click="hostClickHandler">
<polymer-element name="x-simple-composed" on-click="hostClickHandler">
<template>
<style>
@host {
Expand All @@ -84,7 +84,7 @@ <h4>Composed custom elements using declarative events</h4>
</x-basic>
</template>
<script>
Polymer.register(this, {
Polymer('x-simple-composed', {
hostClickHandler: function(inEvent, inDetail, inSender) {
console.log('clicked on host!', this.localName, inEvent);
},
Expand All @@ -93,7 +93,7 @@ <h4>Composed custom elements using declarative events</h4>
}
});
</script>
</element>
</polymer-element>


</body>
Expand Down
6 changes: 3 additions & 3 deletions workbench/mdv/memory-compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<button onclick="continuous()">Continuous</button>
<div id="work"></div>

<element name="x-test">
<polymer-element name="x-test">
<template>
<style>
@host {
Expand All @@ -44,7 +44,7 @@
<div style="background: {{ten}};">ten</div>
</template>
<script>
Polymer.register(this, {
Polymer('x-test', {
one: 'tomato',
two: 'steelblue',
three: 'whitesmoke',
Expand Down Expand Up @@ -77,7 +77,7 @@
}
});
</script>
</element>
</polymer-element>
<script>
var work = document.querySelector('#work');

Expand Down
6 changes: 3 additions & 3 deletions workbench/mdv/memory-manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<button onclick="continuous()">Continuous</button>
<div id="work"></div>

<element name="x-test">
<polymer-element name="x-test">
<template>
<style>
@host {
Expand All @@ -44,7 +44,7 @@
<div foo="{{ten}}">ten</div>
</template>
<script>
Polymer.register(this, {
Polymer('x-test', {
one: 'tomato',
two: 'steelblue',
three: 'whitesmoke',
Expand Down Expand Up @@ -79,7 +79,7 @@
}
});
</script>
</element>
</polymer-element>
<script>
var work = document.querySelector('#work');

Expand Down
6 changes: 3 additions & 3 deletions workbench/mdv/memory-no-insert.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<button onclick="continuous()">Continuous</button>
<div id="work"></div>

<element name="x-test">
<polymer-element name="x-test">
<template>
<style>
@host {
Expand All @@ -44,7 +44,7 @@
<div foo="{{ten}}">ten</div>
</template>
<script>
Polymer.register(this, {
Polymer('x-test', {
one: 'tomato',
two: 'steelblue',
three: 'whitesmoke',
Expand Down Expand Up @@ -78,7 +78,7 @@
}
});
</script>
</element>
</polymer-element>
<script>
var work = document.querySelector('#work');

Expand Down
6 changes: 3 additions & 3 deletions workbench/mdv/memory.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<button onclick="continuous()">Continuous</button>
<div id="work"></div>

<element name="x-test">
<polymer-element name="x-test">
<template>
<style>
@host {
Expand All @@ -44,7 +44,7 @@
<div foo="{{ten}}">ten</div>
</template>
<script>
Polymer.register(this, {
Polymer('x-test', {
one: 'tomato',
two: 'steelblue',
three: 'whitesmoke',
Expand Down Expand Up @@ -78,7 +78,7 @@
}
});
</script>
</element>
</polymer-element>
<script>
var work = document.querySelector('#work');

Expand Down
2 changes: 1 addition & 1 deletion workbench/oldSmoke/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="UTF-8">
<title></title>
<script src="../polymer.js"></script>
<script src="../../polymer.js"></script>
<link rel="import" href="x-foo.html">
<link rel="import" href="x-bar.html">
<link rel="import" href="x-zot.html">
Expand Down
6 changes: 3 additions & 3 deletions workbench/oldSmoke/x-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<element name="x-bar">
<polymer-element name="x-bar">
<template>
<content></content>
</template>
<script>
Polymer.register(this, {
Polymer('x-bar', {
label: "tabula rasa",
ready: function() {
this.update();
Expand All @@ -18,4 +18,4 @@
}
});
</script>
</element>
</polymer-element>
6 changes: 3 additions & 3 deletions workbench/oldSmoke/x-foo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<element name="x-foo">
<polymer-element name="x-foo">
<template>
It LIVES <content></content>
<x-bar label="{{label}}"></x-bar>
</template>
<script>
Polymer.register(this, {
Polymer('x-foo', {
label: '',
ready: function(root) {
this.textContent = 'cordon bleu';
Expand All @@ -20,4 +20,4 @@
}
});
</script>
</element>
</polymer-element>
6 changes: 3 additions & 3 deletions workbench/oldSmoke/x-zot.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<element name="x-zot" extends="x-foo">
<polymer-element name="x-zot" extends="x-foo">
<template>
<shadow></shadow>
</template>
<script>
Polymer.register(this, {
Polymer('x-zot', {
});
</script>
</element>
</polymer-element>
18 changes: 9 additions & 9 deletions workbench/styling/host.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h4>Expected: red background with blue text and orange border</h4>
<h4>Expected: red background with blue text and orange border and 20px padding</h4>
<x-zim></x-zim>

<element name="x-foo">
<polymer-element name="x-foo">
<template>
<style>
@host {
Expand All @@ -35,10 +35,10 @@ <h4>Expected: red background with blue text and orange border and 20px padding</
</style>
<div>red background</div>
</template>
<script>Polymer.register(this)</script>
</element>
<script>Polymer('x-foo')</script>
</polymer-element>

<element name="x-bar" extends="x-foo">
<polymer-element name="x-bar" extends="x-foo">
<template>
<style>
@host {
Expand All @@ -50,10 +50,10 @@ <h4>Expected: red background with blue text and orange border and 20px padding</
<shadow></shadow>
<div>white text</div>
</template>
<script>Polymer.register(this)</script>
</element>
<script>Polymer('x-bar')</script>
</polymer-element>

<element name="x-zot" extends="x-bar">
<polymer-element name="x-zot" extends="x-bar">
<template>
<style>
@host {
Expand All @@ -65,8 +65,8 @@ <h4>Expected: red background with blue text and orange border and 20px padding</
<shadow></shadow>
<div>orange border & gray background</div>
</template>
<script>Polymer.register(this)</script>
</element>
<script>Polymer('x-zot')</script>
</polymer-element>

<link rel="import" href="zim.html">
</body>
Expand Down
4 changes: 2 additions & 2 deletions workbench/styling/zim.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<element name="x-zim" extends="x-zot">
<polymer-element name="x-zim" extends="x-zot">
<link rel="stylesheet" href="host.css">
<template>
<shadow></shadow>
<div>padding: 20px</div>
</template>
<script>Polymer.register(this)</script>
<script>Polymer('x-zim')</script>
</element>

0 comments on commit 51e386e

Please sign in to comment.