I am trying to render an amp doc similar to https://codelabs.developers.google.com/codelabs/amp-in-pwa/#6
When I do
fetchDocument(url).then(function(doc) {
// Let AMP take over and render the page
var ampedDoc = AMP.attachShadowDoc(container, doc, url);
ampedDoc.close();
});
the amp doc (fetched from url) is placed in the container but amp-tags are not rendered.
For example: amp-img tag is in the sources but it does not render as an img tag in the way "Googe Search" does when it renders that doc.
Question: Is there a way to render amp-components when loading amp documents with https://cdn.ampproject.org/shadow-v0.js