I'm doing a test.It's gonna be constantly passing the updated imageData to the background page and everything runs well,but the data posted will not be imageData.I'm stuck here.
contentscript.js:
var Data=context.getImageData(0,0,canvas.width,canvas.height)
port.postMessage(Data)
background.js:
var Data
chrome.extension.onConnect.addListener(function(port)
{
port.onMessage.addListener(function(msg) {
Data=msg
})
})
The imageData will end up being a object,which is nonsense. Could you please help me? This is what the imageData will be