Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sandboxed Javascript Execution in an Internet Explorer Extension (BHO)

Firefox has the Sandbox and evalInSandbox(). Chrome has sandboxed execution in their content scripts (they call it isolated execution). I'm looking for the same thing in an IE browser extension.

I can load a javascript file, then call evalScript(), but the code executes in the same environment as javascript that exists on the page. I need a way to run my library (which includes and is based on jQuery) in an sandboxed/isolated environment, but still allow it to modify the DOM as if it were running on the page.

Jint looks promising, but cannot currently evaluate jQuery. (They can parse it.)

How can I do this?

like image 869
TelegramSam Avatar asked Jan 08 '10 18:01

TelegramSam


2 Answers

Looks like you are in a pickle with this one.

  • Some Microsoft people say that IE doesn't offer this functionality
  • Some who say they have been able to pull this off hold it close and protect it as their secret sauce
  • "Professional" IE extension shops, when contacted about building what you are talking about turn down the job

I really wish I had better news but it looks like it might take a small miracle to accomplish what you are looking for... or maybe a lot of money. : )

Your best bet is probably going to be finding one of the few who claim they have been able to do it and pay them a lot to share the secret or reconsider why you really want what you want and see if you can't accomplish it another way.

like image 92
Mike Grace Avatar answered Sep 20 '22 12:09

Mike Grace


You might find it worthwhile looking at the Microsoft Web Sandbox at the Live Labs: http://websandbox.livelabs.com/

Although it's more fully fledged and related to mashups and the like it might point you in the right direction.

like image 44
jmcd Avatar answered Sep 20 '22 12:09

jmcd