IRC Log Viewer » #firebreath » 2014-04-16

IRC Nick Time (GMT-7) Message
grokblah 11:04 @taxilian, I found that this was the problem (and still is): https://groups.google.com/forum/#!msg/firebreath-dev/aWfc4PTigMg/o4hFhkD_G_cJ
taxilian 11:04 you have no iwebbrowser2?
grokblah 11:04 correct
taxilian 11:04 that's very strange...
grokblah 11:04 because the plugin is added via javascript, IE puts it in another thread
taxilian 11:04 hmm. how are you instantiating it?
grokblah 11:04 I was learning too much about COM objects and having to mashall handles between threads
taxilian 11:04 I'm sorry, my friend. it's a terrible burden to bear
grokblah 11:04 it looked like Oleg found a solution but I'm not sure if he used an iframe as a workaround or he found a fix
it looked like Oleg found a solution but I'm not sure if he used an iframe as a workaround or he found a fix
I don't want to learn any more about the COM architecture so I'm probably going to make an IE-only iframe workaround
btw, I tried to connect with you on LinkedIn (Shane Clements)
yeah, because it is dynamically loaded and in another thread, the lack of an iwebbrowser2 means that it uses the non-browser codepath that makes return values that the browser drops
I kind of wish IE would just go away
taxilian 11:04 ahh, that's you
I don't accept anything on linkedin unless I know who it is
I don't accept anything on linkedin unless I know who it is
so how are you adding it to the DOM?
can you pastebin your JS code?
grokblah 11:04 sure
oh, it's here: http://scratch.mit.edu/scratchr2/static/js/scratch_extensions/scratch_ext.js in createDevicePlugin()
oh, it's here: http://scratch.mit.edu/scratchr2/static/js/scratch_extensions/scratch_ext.js in createDevicePlugin()
taxilian 11:04 yep, that'll do it
don't ever create it that way =]
grokblah 11:04 my more recent code adds codebase for the cab file
my more recent code adds codebase for the cab file
taxilian 11:04 there are two ways you can change this that will likely fix your issue
there are two ways you can change this that will likely fix your issue
grokblah 11:04 ok
that way does work in Chrome/Safari/Firefox/Opera
taxilian 11:04 heh. usually
on the latest versions
if you're lucky
if you're lucky
basically the problme is that you're instantiating the plugin *before* you add it to the DOM
basically the problme is that you're instantiating the plugin *before* you add it to the DOM
which is a very bad idea
what you need to do is either wait to set the type until after you put it in the DOM, or (my preference) build the object tag as html and insert it using innerHTML
grokblah 11:04 oh
taxilian 11:04 adding it using innerHTML will likely fix the "created by javascript" thing, if that is actually what is happening (which I'm not sure of). I suspect that you're actually losing your IWebBrowser reference when it's moved in the DOM
adding it using innerHTML will likely fix the "created by javascript" thing, if that is actually what is happening (which I'm not sure of). I suspect that you're actually losing your IWebBrowser reference when it's moved in the DOM
grokblah 11:04 huh
taxilian 12:04 grokblah did you try it?
grokblah 14:04 yes, I finally have IE working (at least in my Win7 VM)
Someone testing the plugin can only get it to work in Firefox (Win7) and Chrome is saying "Could not load Scratch Device Plugin"
he says that it won't load in IE at all
I don't know what's going on with his machine