Blame view

bower_components/iron-signals/README.md 1.1 KB
a1a3bc73   Luigi Serra   graphs updates
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
  
  <!---
  
  This README is automatically generated from the comments in these files:
  iron-signals.html
  
  Edit those files, and our readme bot will duplicate them over here!
  Edit this file, and the bot will squash your changes :)
  
  -->
  
  [![Build Status](https://travis-ci.org/PolymerElements/iron-signals.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-signals)
  
  _[Demo and API Docs](https://elements.polymer-project.org/elements/iron-signals)_
  
  
  ##&lt;iron-signals&gt;
  
  
  `iron-signals` provides basic publish-subscribe functionality.
  
  Note: avoid using `iron-signals` whenever you can use
  a controller (parent element) to mediate communication
  instead.
  
  To send a signal, fire a custom event of type `iron-signal`, with
  a detail object containing `name` and `data` fields.
  
      this.fire('iron-signal', {name: 'hello', data: null});
  
  To receive a signal, listen for `iron-signal-<name>` event on a
  `iron-signals` element.
  
    <iron-signals on-iron-signal-hello="{{helloSignal}}">
  
  You can fire a signal event from anywhere, and all
  `iron-signals` elements will receive the event, regardless
  of where they are in DOM.