mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
101 lines
1.9 KiB
HTML
101 lines
1.9 KiB
HTML
<script>
|
|
Polymer({
|
|
is: 'x-basic',
|
|
hostAttributes: {
|
|
attr1: 'this is attr 1',
|
|
attr2: 42,
|
|
'aria-role': 'button',
|
|
title: 'awesome',
|
|
'attr-object': {foo: 'bar', nested: {'meaning': 42}, arr: [0, 'foo', true]},
|
|
'attr-stupid': false
|
|
},
|
|
properties: {
|
|
object: {
|
|
type: Object,
|
|
value: function() { return {}; }
|
|
},
|
|
array: {
|
|
type: Array,
|
|
value: function() { return []; }
|
|
},
|
|
number: {
|
|
type: Number,
|
|
value: 0
|
|
},
|
|
string: {
|
|
type: String,
|
|
value: 'none'
|
|
},
|
|
bool: {
|
|
type: Boolean,
|
|
value: true
|
|
},
|
|
negBool: {
|
|
type: Boolean,
|
|
value: false
|
|
},
|
|
date: {
|
|
type: Date,
|
|
value: function() { return new Date(0); }
|
|
},
|
|
dashCase: {
|
|
type: String,
|
|
value: 'none'
|
|
},
|
|
noType: {
|
|
value: 'none'
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
Polymer({
|
|
is: 'x-reflect',
|
|
properties: {
|
|
object: {
|
|
type: Object,
|
|
reflectToAttribute: true,
|
|
value: function() { return {}; }
|
|
},
|
|
array: {
|
|
type: Array,
|
|
reflectToAttribute: true,
|
|
value: function() { return []; }
|
|
},
|
|
number: {
|
|
type: Number,
|
|
reflectToAttribute: true,
|
|
value: 0
|
|
},
|
|
string: {
|
|
type: String,
|
|
reflectToAttribute: true,
|
|
value: 'none'
|
|
},
|
|
bool: {
|
|
type: Boolean,
|
|
reflectToAttribute: true,
|
|
value: true
|
|
},
|
|
negBool: {
|
|
type: Boolean,
|
|
reflectToAttribute: true,
|
|
value: false
|
|
},
|
|
date: {
|
|
type: Date,
|
|
reflectToAttribute: true,
|
|
value: function() { return new Date(0); }
|
|
},
|
|
dashCase: {
|
|
type: String,
|
|
reflectToAttribute: true,
|
|
value: 'none'
|
|
},
|
|
noType: {
|
|
value: 'none'
|
|
}
|
|
}
|
|
});
|
|
</script> |