- HP Support Forum Home
- >
- Printer/All-In-One
- >
- Web Printing
- >
- HP Smart Web Printing breaks Adblock Plus in Firefox (access...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
HP Smart Web Printing breaks Adblock Plus in Firefox (accessing document too early)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
01-03-2010 11:31 PM
I got a report that HP Smart Web Printing breaks Adblock Plus extension in Firefox. I checked the extension, the file toolbar.js in chrome/smartwebprinting.jar seems to cause the issue:
// Code at global scope
addEventListener("load", hpInitToolbar, false);
var printcmd = document.getElementById("cmd_print");
if(printcmd)
{
printcmd.setAttribute("oncommand","NormalPrint();"
}
var printpreviewcmd = document.getElementById("cmd_printPreview");
if(printpreviewcmd)
{
printpreviewcmd.setAttribute("oncommand","NormalPr
}
This registers a listener for the "load" event - but some actions are carried out immediately, without waiting for the event to happen. Accessing browser's document before it is loaded breaks Adblock Plus and probably causes the issues reported in http://h30434.www3.hp.com/t5/Mobile-and-Web-printi
Unfortunately, I don't see any way to report this bug other than creating a topic here.

