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

Broadcast event in viewer #1424

Merged
merged 1 commit into from
Jan 14, 2016
Merged

Broadcast event in viewer #1424

merged 1 commit into from
Jan 14, 2016

Conversation

dvoytenko
Copy link
Contributor

No description provided.

@dvoytenko
Copy link
Contributor Author

/cc @ericfs please see the implementation in the viewer.js file. Should be completely symmetric to the viewer bindings. I followed your advise and switch from string payload to * (which is JSONObject in our world).

@erwinmombay
Copy link
Member

@dvoytenko you think we should render a different doc for contrast?

function showContainer(id) {
log('Show container: ', id);
var viewerEl = document.querySelector('viewer');
viewerEl.setAttribute('data-show-container', id);
Copy link
Member

Choose a reason for hiding this comment

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

why did we have to go through the attribute route instead of a class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only for convenience. Easier to set a single value than toggle different classes on/off.

@ericfs
Copy link

ericfs commented Jan 14, 2016

LGTM

@dvoytenko
Copy link
Contributor Author

@erwinmombay would like a different document, but I only have :) Eventually we will just allow URLs to be passed as arguments to this sample.

@erwinmombay
Copy link
Member

@dvoytenko LGTM

dvoytenko added a commit that referenced this pull request Jan 14, 2016
@dvoytenko dvoytenko merged commit 60ddb4d into ampproject:master Jan 14, 2016
@dvoytenko dvoytenko deleted the access18d branch January 14, 2016 19:38
dvoytenko pushed a commit to dvoytenko/amphtml that referenced this pull request Jan 14, 2016
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

Successfully merging this pull request may close these issues.

3 participants