antv/g2 使用blob 协议加载worker,这在不允许blob 的环境中会不能正常执行
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
@antv/g2 中使用 URL.createObjectURL(blob) 创建 worker, 当页面中不允许使用blob 协议的woker时(譬如页面中使用csp 并将指令设置为 worker-src: 'xxx.example.com'), 当前代码不能正常工作, 能否支持在blob 协议不能支持的情况下,退回到主线程使用eval 去执行该段代码逻辑, 或者改成不使用 blob 协议进行资源加载;

### 重现链接
_No response_
### 重现步骤
_No response_
### 预期行为
_No response_
### 平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
### 屏幕截图或视频(可选)
_No response_
### 补充说明(可选)
_No response_
Contributor guide
Research direction
Locate the TypeScript worker implementation that calls URL.createObjectURL with a Blob and trace how it is initialized. First reproduce the failure under a CSP that disallows blob workers; done means worker-dependent behavior still functions through a documented fallback or non-Blob loading path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100