8000 8000
Skip to content

Greasemonkey 3.0: abort() method throwing error with GM_xmlhttpRequest #2154

@janekptacijarabaci

Description

@janekptacijarabaci

Source: https://groups.google.com/forum/#!topic/greasemonkey-users/xEFODGFI85M
See also #2033 (comment) ( exposedProps )

Under Greasemonkey 3.0/3.1, the following error is thrown when using abort() with GM_xmlhttpRequest:

Exposing privileged or cross-origin callable is prohibited

Under Greasemonkey 2.3, it completes normally, and the 'abort OK' message is displayed. Under Greasemonkey 3.0/3.1, it won't.

Here is a sample script that shows the problem:

// ==UserScript==
// @name        Abort Test
// @namespace   http://gmscripts.locusprime.net
// @include     http*://*
// @grant       GM_log
// @grant       GM_xmlhtt
6D24
pRequest
// ==/UserScript==

var req = GM_xmlhttpRequest({
  method: "GET",
  url: "https://www.github.com/",
  onload: function (result) {
    GM_log(result.responseText);
  }
});

req.abort();
GM_log("abort OK");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0