-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo-image-el.html
49 lines (44 loc) · 1.19 KB
/
demo-image-el.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<link rel="import" href="../polymer/polymer.html">
<!-- this is a demo element that is being rendered by row-adder element -->
<dom-module id="demo-image-el">
<style>
:host {
display: block;
margin: 0;
padding: 50px;
}
img {
height: 100%;
width: 100%;
}
</style>
<template>
<img src$="[[src]]" alt$="[[alt]]" is-content="attr" content-id="image-url" content-attr="src, alt">
</template>
<script>
Polymer({
is: 'demo-image-el',
properties: {
src: {
type: String,
value: '',
reflectToAttribute: true,
notify: true
},
alt: {
type: String,
value: '',
notify: true
},
usercontent: {
type: Object,
notify: true,
reflectToAttribute: false
}
},
behaviors: [
ContentEditorBehavior
],
});
</script>
</dom-module>