window.addEventListener('afterprint', (event) => {
console.log('After print');
});
window.onafterprint = (event) => {
console.log('After print');
};
commands work on PDF pages? I made a code to send a message to my background.js after print, the code works perfectly on all chrome pages, but on PDF pages they just don't work, and they don't return any kind of error?
"permissions":
["tabs",
"activeTab",
"nativeMessaging",
"scripting"],
"host_permissions": [
"http://*/*",
"https://*/*"
],
"content_scripts":[
{
"js": ["popup.js"],
"matches": ["<all_urls>"]
}
Other commands like Window.Print() and functions work perfectly... but the others that I mentioned above don't work, they don't return an error, simply nothing happens on these PDF pages