ampproject / ampproject/worker-dom
Add support for Element.scrollTop
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
According to https://github.com/ampproject/worker-dom/blob/master/web_compat_table.md
Element.scrollTop is not yet supported.
Would be great to add support for that, this way we could do things like:
```
window.addEventListener('scroll', e => {
const parts = document.querySelector('#globalFooter');
if (window.innerHeight < document.documentElement.scrollTop) {
parts.style.display ="block";
} else {
parts.style.display ="none";
}
});
```
Contributor guide
Research direction
Start with web_compat_table.md and locate the Element.scrollTop entry, then search the repository for the corresponding Element or scrolling implementation. Confirm the behavior against the example in the issue and add or update coverage if the repository provides relevant tests; done means Element.scrollTop works as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100