• Rob Wu's avatar
    Add callbacks to all pageAction/browserAction/action methods · 5b4e8c54
    Rob Wu authored
    browserAction and pageAction methods take a tabId as parameter.
    An extension cannot ensure that the tabId is valid, since the tab might
    be removed between the invocation and the handling of the API method.
    To suppress the error, extensions need to be able to access the
    `chrome.runtime.lastError` object in the callback, which means that
    all extension action API methods need to accept an optional callback.
    
    BUG=451320
    
    Change-Id: I4bd1fe8b17bdb98da7b33a03ec814294d5860da1
    Reviewed-on: https://chromium-review.googlesource.com/979451Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Commit-Queue: Rob Wu <rob@robwu.nl>
    Cr-Commit-Position: refs/heads/master@{#545797}
    5b4e8c54
action.json 10.6 KB