<!---
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 :)
The bot does some handling of markdown. Please file a bug if it does the wrong
thing! https://github.com/PolymerLabs/tedium/issues
-->
[![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)_
##<iron-signals>
`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.
```javascript
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.
没有合适的资源?快使用搜索试试~ 我知道了~
发布-订阅功能_HTML_下载.zip
共9个文件
html:3个
md:3个
yml:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 167 浏览量
2023-04-27
10:57:32
上传
评论
收藏 8KB ZIP 举报
温馨提示
发布-订阅功能_HTML_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
发布-订阅功能_HTML_下载.zip (9个子文件)
iron-signals-master
.travis.yml 784B
.github
ISSUE_TEMPLATE.md 722B
demo
index.html 2KB
CONTRIBUTING.md 3KB
iron-signals.html 2KB
index.html 791B
.gitignore 17B
README.md 1KB
bower.json 822B
共 9 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功