Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding broadcast #145

Closed
sorvell opened this issue May 20, 2013 · 6 comments
Closed

Consider adding broadcast #145

sorvell opened this issue May 20, 2013 · 6 comments
Assignees

Comments

@sorvell
Copy link
Contributor

sorvell commented May 20, 2013

Sometimes a custom elements wants to give its descendants some generic information which they may, optionally, respond to.

This is very much like an event, but it's sent downward to children.

@RenaudF
Copy link

RenaudF commented Jun 16, 2014

+1, see this SO question

@peterwmwong
Copy link
Contributor

+1

@robdodson
Copy link
Contributor

I posted a response to the SO question. I think @sorvell might be describing a one-way message passing system which only flows to an element's children, whereas the SO thread seems to want PubSub.

@RenaudF
Copy link

RenaudF commented Jun 16, 2014

Without going as far as full pubsub implementation, a simple broadcast or event bus capability would go a long way. The solution you linked to does the trick perfectly, I should start having a look at those articles (no clues in the API section). Shouldn't that polymer-signals element be part of the core, just as core-ajax ?

@robdodson
Copy link
Contributor

Yep, we're discussing it. Thread to follow is here:
googlearchive/polymer-signals#3

On Mon, Jun 16, 2014 at 9:17 AM, Renaud Fontana [email protected]
wrote:

Without going as far as full pubsub implementation, a simple broadcast or
event bus capability would go a long way. The solution you linked to does
the trick perfectly, I should start having a look at those articles (no
clues in the API section). Shouldn't that polymer-signals element be part
of the core, just as core-ajax ?


Reply to this email directly or view it on GitHub
#145 (comment).

@sjmiles
Copy link
Contributor

sjmiles commented Aug 18, 2014

Broadcast seems like a bad idea at this point. There are other patterns:

  1. child elements bubble an event to register interest in a signal
  2. core-signals
  3. child element registers listener on body, signal is bubbled up instead of waterfalled down (flavor of [2], as implemented currently)

@sjmiles sjmiles closed this as completed Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants