I am trying to send Mouse Event to my Offscreen Tab and I received following error:
Error during experimental.offscreenTabs.sendMouseEvent:
Invalid or unexpected MouseEvent object
My Code:
chrome.experimental.offscreenTabs.sendMouseEvent(tab.id, {
"type": "click",
"altKey": false,
"ctrlKey": false,
"shiftKey": false
}, {
"x": 10,
"y": 10
}, function () {
console.log("Mouse Event Sent");
});
Any Suggestions?
You need to add a
buttonkey as well if you use a mouse event.Since the API is experimental, and the documentation is not quite complete, I looked in the source code:
PS. I managed to get a Developer tools instance when I used
button: 2. Quite useful for debugging interaction with an offscreen tab!