d3 v7.9.0 – d3.pointer() uses createSVGPoint() which is now deprecated

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

@Fil is already working on this.

Since Jan 3, 2025.

  • #322 by @Fil — open

Assessment

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

Research direction

Start by locating d3.pointer() in the d3-selection source and checking how it currently uses createSVGPoint(). Review the linked pull request #322 for work already underway and compare its approach with the issue’s suggestion to use DOMPoint or DOMPointReadOnly. Done means the pointer calculation no longer depends on the deprecated API and the relevant tests pass.

Written by the indexing model from the issue text.

Description

The function createSVGPoint() is deprecated according to https://developer.mozilla.org/en-US/docs/Web/API/SVGPoint.

It doesn't throw any errors but it may be best to refactor d3.pointer to use DOMPoint or DOMPointReadOnly for future browser support.

Dominant language
JavaScript
Stars
571
Forks
283
Avg merge
7h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from d3/d3-selection

All issues in d3/d3-selection

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.