-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[WIP] Moving viewer.js into own service, still buggy #1122
[WIP] Moving viewer.js into own service, still buggy #1122
Conversation
Pinging @cramforce and @erwinmombay. |
The reason is that history depends on viewer. The easy fix is to swap installation, the better fix is to install the viewer service from the history service (on top of the change to amp.js). |
@AaronCritchley can you try adding: import {installViewerService} from '../service/viewer-impl';
installViewerService(window); on |
Sadly no luck.
|
Could you try to use Chrome DevTools or another way to get a stack trace for when or from where viewerFor is called? |
@AaronCritchley so in viewport.js it looks like we also need to do: import {installViewerService} from './service/viewer-impl';
installViewerService(window); /cc @cramforce |
oh and dont forget to add: import {getElementService} from './service'; in history.js |
Changes implemented, I've merged master but feeling somewhat unsure if I've screwed something up with my implementation. I will squash all of the commits when the PR is in good shape, thanks for being so patient with the whole thing! |
@AaronCritchley yep, just keep the commits for now, they'll be useful for me for debugging until we get everything working. thanks! |
Closing as @cramforce has done this work (thanks!) in #1236. |
Moving viewer.js into it's own service in accordance with Issue #1055.
As of time of writing, I'm running into the followiung bug when running
gulp test
:Chrome 45.0.2454 (Linux 0.0.0) ERROR Uncaught Error: Factory not given and service missing viewer at /tmp/47145ce937f497c2d26f372086a6259b.browserify:19159 <- /home/aaron/amphtml/src/asserts.js:62:4