Hacker News new | ask | show | jobs
by xg15 2716 days ago
> Furthermore, there's no good reason to use web accessible resources in an extension! You can always find a solution to your problem that does not require them.

How would I e.g inject an extension-provided image into a web page without using web accessible resources?

The only ways I can think of would be copying the image to a blob or drawing it on a canvas - both seem significantly more complex than just injecting an IMG tag and would still be detectable as side effects.

1 comments

I'm not familiar with writing browser extensions, but data URI comes to mind.
Ah, right, I forgot those. That's true of course.

I think you could still use them for side-effect detection (watch for images/scripts/etc with a known data uri suddenly appearing in your DOM) - but at least you couldn't actively query it without the extension doing anything.