Skip to content

[BUG] MV2版本中GM_xmlhttpRequestonerror时参数为空字符串 #1416

@dawn-lc

Description

@dawn-lc

问题描述

在当前版本中调用GM_xmlhttpRequest并请求任意未开启http/https服务的地址时onerror参数为空字符串

重现步骤

// ==UserScript==
// @name         GM_xmlhttpRequest_Test
// @namespace    https://github.com/dawn-lc/
// @version      0.0.1
// @description  GM_xmlhttpRequest onerror test
// @author       dawn-lc
// @match        *://*/*
// @grant        GM_xmlhttpRequest
// @noframes
// ==/UserScript==
(function() {
  GM_xmlhttpRequest({
    method: 'POST',
    url: 'http://127.0.0.1:12345/test',
    data: 'test',
    onerror: (err) => {
      debugger
    }
  });
})();

脚本猫版本

v0.16.14

操作系统以及浏览器信息

Firefox Developer Edition

补充信息 (选填)

Image

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions