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

Create skeleton and navigation for FIE ampdocs #22737

Merged
merged 6 commits into from Jun 24, 2019

Conversation

dvoytenko
Copy link
Contributor

Partial for #22734.

Copy link

@dreamofabear dreamofabear left a comment

Choose a reason for hiding this comment

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

Overall LGTM.

src/dom.js Show resolved Hide resolved
src/friendly-iframe-embed.js Outdated Show resolved Hide resolved
src/friendly-iframe-embed.js Outdated Show resolved Hide resolved
return (
value.nodeType == /* DOCUMENT_FRAGMENT */ 11 &&
Object.prototype.toString.call(value) === '[object ShadowRoot]'
);

Choose a reason for hiding this comment

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

Do we need this code path? I think we can just check tagName inline and call it a day.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. It's too difficult to assume that this API will only be called in the polyfill case. It's a reasonable check for any node. Unfortunately, shadow roots have DOCUMENT_FRAGMENT type and thus difficult to determine.

Choose a reason for hiding this comment

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

Yea I mean we could remove this function and just check tagName anywhere we care. Or rename to isPolyfillShadowRoot. Save a few bytes for an unused code path. :)

src/service/ampdoc-impl.js Outdated Show resolved Hide resolved
@dvoytenko dvoytenko force-pushed the ampdoc14 branch 3 times, most recently from 6085a5e to 3e492ff Compare June 13, 2019 04:26
@dvoytenko dvoytenko merged commit 4f3d688 into ampproject:master Jun 24, 2019
@dvoytenko dvoytenko deleted the ampdoc14 branch June 24, 2019 22:22
thekorn pushed a commit to edelight/amphtml that referenced this pull request Sep 11, 2019
* Create skeleton and navigation for FIE ampdocs

* review fixes

* lints

* fixes

* test fixes

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants