Skip to content

Just how does the viewer work? #1686

@jpettitt

Description

@jpettitt

I've been looking at the viewer example code all day and come to the conclusion that it will never actually work. Specifically the viewer example has a lot of message passing code in viewer-integr-messaging.js but if I grep the source and look at every addEventListener() call in the ./src tree I can only find one instance where it's listening for 'message' and that is in listen() in iframe-helper.js which isn't being called if there are no <amp-iframe> elements.

I confirmed this in chrome debugger by dumping all the listeners on the iframe window containing the AMP document and there is nothing there listening for messages.

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions