Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Bug 854980 - Implementing simple utils for observing window / tab events #903

Merged
merged 1 commit into from Apr 1, 2013

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Mar 26, 2013

This change introduces foundation that would allow decoupling tabs from windows so that each of them can be de-traitified separately. It also introduces replacement for a deprecated WindowTracker as a part of this work.

function dispatch({ type, subject }) {
emit(channel, "data", {
topic: type,
type: topics[type],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

topic = type and type = topics[type] seems ver confusing

can we do topic = topic and type = types[topic] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this ?

function dispatch({ type: topic, subject }) {
  emit(channel, "data", {
    type: types[topic],
    topic: topic,
    target: subject
  })
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya this looks much better!

Gozala added a commit that referenced this pull request Apr 1, 2013
Bug 854980 - Implementing simple utils for observing window / tab events r=@Mossop
@Gozala Gozala merged commit e5fd0a0 into mozilla:master Apr 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants