Skip to content

fix: 修复GM xhr不正确处理异常 onloadend 的问题#1412

Open
cyfung1031 wants to merge 3 commits intomainfrom
fix/GMxhr/20260507
Open

fix: 修复GM xhr不正确处理异常 onloadend 的问题#1412
cyfung1031 wants to merge 3 commits intomainfrom
fix/GMxhr/20260507

Conversation

@cyfung1031
Copy link
Copy Markdown
Collaborator

Checklist / 检查清单

  • Fixes mentioned issues / 修复已提及的问题
  • Code reviewed by human / 代码通过人工检查
  • Changes tested / 已完成测试

Description / 描述

  • 修复GM xhr不正确处理异常 onloadend 的问题 (即 abort, timeout, fetch error 等行为)
  • 加入新单元测试项目

Screenshots / 截图

@cyfung1031 cyfung1031 added bug Something isn't working P0 🚑 需要紧急处理的内容 labels May 6, 2026
Comment thread example/tests/gm_xhr_test.js Outdated
Comment on lines +1007 to +1013
// const nwError2 = await runCase(
// {
// url: `https://nonexistent-domain-abcxyz.reject/abc.html`, // disallowed domain
// },
// { abortAfterMs: 500 }
// );
// assertDeepEq(nwError2.events, ["onerror", "onloadend"], "abort fires onerror then onloadend");
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodFrm 这个跟 权限验证 的设计有关。我不知道你会怎么改(上次改了后你又改回来之类。。不想搞)。这个PR我先不处理。 你可以先合并日后再处理

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我先做了个简单改动处理了
你再看看吧

@CodFrm 修正 权限错误的 onloadend 丢失问题 fd551c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working P0 🚑 需要紧急处理的内容

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants