NativeScript / NativeScript/canvas

XMLHttpRequest break NS default functionality

Open
#87 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
103
Forks
21
Avg merge
16h 10m
Merged PRs (30d)
8

Description

NativeScript Core already contains a polyfill for XMLHttpRequest here:
https://github.com/NativeScript/NativeScript/blob/main/packages/core/xhr/index.ts

Canvas-polyfill uses its own polyfill: https://github.com/NativeScript/canvas/blob/master/packages/canvas-polyfill/async/xhr/TNSXMLHttpRequest.ts

This breaks functionality for libraries that use default NS polyfill (e.g. axios).

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

Compare NativeScript Core's packages/core/xhr/index.ts with canvas-polyfill's packages/canvas-polyfill/async/xhr/TNSXMLHttpRequest.ts, starting from the XMLHttpRequest implementation used by canvas-polyfill. Check how libraries such as axios select the default NativeScript polyfill, and consider the issue resolved when that functionality no longer breaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.