Skip to content

TBD: Shadow DOM streamer#9428

Closed
dvoytenko wants to merge 2 commits intoampproject:masterfrom
dvoytenko:pwa22
Closed

TBD: Shadow DOM streamer#9428
dvoytenko wants to merge 2 commits intoampproject:masterfrom
dvoytenko:pwa22

Conversation

@dvoytenko
Copy link
Copy Markdown
Contributor

"Since Shadow DOM streaming is not coming to us, ..."

This exact utility can be reused for streaming friendly iframes as well.

Copy link
Copy Markdown
Member

@cramforce cramforce left a comment

Choose a reason for hiding this comment

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

WOW!

I think this might need to like be its own open source project. Could just give it a package.json and publish to NPM.
@jakearchibald I believe this is relevant to your interest.

// Maybe this is a last child? Try parents.
let localDepth = 0;
for (let n = this.inputPoint_.parentNode;
n && n != this.input_;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: indent looks off

// descendant of this node with a sibling. If found, it imports the
// partial DOM path and the found descendant node into the target DOM.
// There are limitations of how deep the input DOM can be split and some
// nodes are not allowed to be split, such as "table" and "ul".
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would you mind adding HTML examples to this comment as a sort of timeline for when things happen?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess the tests kind of do this already, but might be nice here.

let next = null;
let depth = 0;
while (!next &&
node.firstChild &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: indent

@dvoytenko
Copy link
Copy Markdown
Contributor Author

/cc @bjalford

@dvoytenko
Copy link
Copy Markdown
Contributor Author

All, please hold on on this, thanks to @jakearchibald and https://twitter.com/jaffathecake/status/865585897172946944 this can be made quite a bit simpler.

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.

3 participants