my extension is calling an ajax request that it should have
permissions to (currently using global permissions), and it keeps
returning an error code of 0 with no further details.

it seems as though the request is getting killed by chromium because
the web inspecter is not showing any details from an actual server
response.

http://github.com/wireframe/delicious-chrome-extension

manifest:
  "permissions": [
    "tabs",
    "bookmarks",
    "https://api.delicious.com/";,
    "https://*.delicious.com/";,
    "http://api.delicious.com/";,
    "http://*.delicious.com/";,
    "https://*/";,
    "http://*/*";
  ],

code:
delicious.saveBookmark = function(params, options) {
  var defaults = {
    type: "GET",
    dataType: "xml",
    url: "https://api.delicious.com/v1/posts/add";,
    data: params,
    error: function(request, status) {
      console.error("Error saving bookmark to delicious: " + status);
    },
    success: function(xml) {
      var result = $(xml).find("result");
      var code = result.attr("code");

      if (code == "done") {
        console.log("Bookmark saved to delicious!");
      } else {
        console.error("Error saving bookmark to delicious: " + code);
      }
    }
  };
  options = $.extend({}, defaults, options);
  $.ajax(options);
};

delicious.saveBookmark({url: 'http://google.com', description:
'test'});

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to