Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support iframe viewport tracking#465

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@samouri
Copy link
Contributor

@samourisamouri commentedNov 13, 2020
edited
Loading

summary
Implements iframe viewport tracking for the polyfill, as described in#372 (comment).

The following tasks have been completed:

  • Modified Web platform tests (link to pull request)

Implementation already completed:

cc@dvoytenko

@samourisamouri marked this pull request as ready for reviewNovember 13, 2020 17:17
@samouri
Copy link
ContributorAuthor

samouri commentedNov 13, 2020
edited
Loading

open question: do we want to do feature detection for iframe viewport tracking and replace native with the polyfill if support is missing?

I'm leaning towards no and allowing consumers to detect it themselves. If they prefer the polyfill they can run delete InOb from window before running the polyfill.

width:html.clientWidth||body.clientWidth,
bottom:html.clientHeight||body.clientHeight,
height:html.clientHeight||body.clientHeight
height:html.clientHeight||body.clientHeight,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't do this in IE :( No trailing commas. You might have to disable the prettier.

@dvoytenko
Copy link
Contributor

I think this is really close now.

@samouri
Copy link
ContributorAuthor

samouri commentedNov 23, 2020
edited
Loading

Darn. I believe I found a webkit bug.

Essentially, Chrome and FF ensure that rootBounds whenroot:document are relative to the specified document (top is always 0). Safari gives the top based on current scroll position within the iframe.

See:https://output.jsbin.com/jutegazuxe

@samouri
Copy link
ContributorAuthor

samouri commentedDec 4, 2020
edited
Loading

Current status:


@dvoytenko: PTAL

Copy link
Contributor

@dvoytenkodvoytenko left a comment

Choose a reason for hiding this comment

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

Looks very good!

@dvoytenko
Copy link
Contributor

  • Chrome: Adifferent newly introduced test fails. Chrome is allowing for cross-document tracking which is explicitly against spec right now.

Can we link the crbug issue here as well?

samouri reacted with thumbs up emoji

@philipwaltonphilipwalton merged commit76ba976 intow3c:masterDec 10, 2020
@samourisamouri deleted the support-iframe-viewport-tracking branchFebruary 28, 2022 02:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@philipwaltonphilipwaltonphilipwalton approved these changes

+1 more reviewer

@dvoytenkodvoytenkodvoytenko approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@samouri@dvoytenko@philipwalton

[8]ページ先頭

©2009-2025 Movatter.jp