amp-pixel breaks the page
Git pulled on 10 sept 2015 By adding an < amp-pixel src="https://....." > the page turns blank. I'm getting the following error in Chrome's console Uncaught Error: Layout not supported for: container ElementProto.firstAttachedCallback_ @ viewport.js:45 ElementProto.attachedCallback @ viewport.js:22 Regards Enrico Canardi
@dvoytenko On Sep 10, 2015 9:12 AM, "teleservizi" [email protected] wrote:
Git pulled on 10 sept 2015 By adding an the page turns blank. I'm getting the following error in Chrome's console Uncaught Error: Layout not supported for: container ElementProto.firstAttachedCallback_ @ viewport.js:45 ElementProto.attachedCallback @ viewport.js:22 Regards Enrico Canardi
— Reply to this email directly or view it on GitHub https://github.com/ampproject/amphtml/issues/56.
So far we've used amp-pixel always with width=1/height=1. I guess that's not super apparent? Should we just hardcode the dimensions when not specified for amp-pixel?
Found the problem, the < amp-pixel > tag has to be closed with </ amp-pixel > otherwise it will wrap every following tag inside the amp-pixel and of course setting width and height solves the jscript error
Please add to the amp-html-components.md file the mandatoriness of the width and height attributes
@dvoytenko Yeah, in this case we definitely should. They are not visible anyway. @teleservizi We do document this in the amp-html-format.md but I agree it should be relaxed here.
amp-pixel is now automatically configured and doesn't require width/height/layout attributes.