medialize / medialize/ally.js

Use IntersectionObserver in when/visible-area

Open
#141 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first contribution improve
Dominant language
JavaScript
Stars
1.6k
Forks
82
PR merge metrics
No merged PRs in 30d

Description

As of Chrome 51 the IntersectionObserver API is available. This is a much more efficient implementation of what when/visible-area does internally. We should use the IntersectionObserver where possible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/when/visible-area.js and the linked IntersectionObserver documentation. Compare the current implementation with the API's available behavior and determine where the existing visible-area behavior must remain unchanged. Done means using IntersectionObserver where possible without losing the module's current functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.