-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
34 lines (29 loc) · 997 Bytes
/
demo.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
<!DOCTYPE html>
<html>
<link rel="import" href="./attribute-editor.html">
<link rel="import" href="bower_components/polymer/polymer.html">
<body>
<template is="dom-bind" id="Demo">
<attribute-editor
usercontent="[[usercontent]]"
path="[[path]]"
content-id="[[contentId]]"
on-value-changed="handleChange"></attribute-editor>
<button on-click="handleClick">Click me</button>
</template>
<script>
Demo.handleClick = function() {
document.querySelector('attribute-editor').open();
}
Demo.usercontent = {
'alt': 'styff',
'src': 'styff'
}
Demo.contentId = 'image-url';
Demo.path = '/some/random/path';
Demo.handleChange = function(e, detail) {
console.log(Demo.usercontent);
}
</script>
</body>
</html>