~didrocks/+junk/face-detection-15.04

« back to all changes in this revision

Viewing changes to facedetection/www/bower_components/iron-signals/demo/index.html

  • Committer: Didier Roche
  • Date: 2016-05-10 23:09:11 UTC
  • Revision ID: didier.roche@canonical.com-20160510230911-c7xr490zrj3yrzxd
New version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html>
 
2
<!--
 
3
@license
 
4
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
 
5
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
 
6
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
 
7
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
 
8
Code distributed by Google as part of the polymer project is also
 
9
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 
10
-->
 
11
<html>
 
12
  <head>
 
13
    <title>iron-signals demo</title>
 
14
 
 
15
    <meta charset="utf-8">
 
16
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 
17
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
 
18
 
 
19
    <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
 
20
    <link rel="import" href="../../paper-styles/demo-pages.html">
 
21
    <link rel="import" href="../iron-signals.html">
 
22
  </head>
 
23
<body>
 
24
 
 
25
  <div class="vertical-section vertical-section-container centered">
 
26
 
 
27
    <h1>&lt;iron-signal&gt;</h1>
 
28
    <template is="dom-bind" id="my-app">
 
29
      <iron-signals on-iron-signal-foo="fooSignal"></iron-signals>
 
30
    </template>
 
31
 
 
32
    <template is="dom-bind" id="signal-message">
 
33
      <template is="dom-if" if="{{detail}}">
 
34
        <div><code>my-app</code> got a <code>{{detail}}</code> signal</div>
 
35
      </template>
 
36
    </template>
 
37
 
 
38
  </div>
 
39
 
 
40
  <script>
 
41
 
 
42
    document.addEventListener("WebComponentsReady", function() {
 
43
      document.querySelector('#my-app').fire('iron-signal', {name: "foo", data: "Foo!"});
 
44
    });
 
45
 
 
46
    document.querySelector("#my-app").fooSignal = function(e, detail, sender) {
 
47
      document.querySelector("#signal-message").detail = detail;
 
48
    };
 
49
  </script>
 
50
 
 
51
  </body>
 
52
</html>