I would like my chrome extension to be able to inject a 300px sidebar on the right side of any page when it is activated. I am looking for the best way to constrain the ent
Thanks to Devin for the sample code. Unlike the other answers, this seemed to work. I actually used this code to write an extension aiming to solve this issue myself. However, I ran into difficulties when using it with certain Gmail tabs.
You can take a look at my hacked-together code for a working example of an iframe sidebar that isn't simply overlaid on the page. However, I haven't yet been able to overcome the aforementioned Gmail bug although this may not be an issue for you. I was simply bringing content in through the iframe src rather than inserting content with document.getElementById(iframeId).contentDocument.body.innerHTML.