IRC Log Viewer » #firebreath » 2013-08-27

IRC Nick Time (GMT-7) Message
morteh 06:08 having problems with a firebreath plugin in chrome (XP only), staticInitialize() seems to run over and over when i add the plugin :/
taxilian 07:08 that's weird
morteh 07:08 think i found the problem, some functionality was causing it to crash, then think it must have been reloading
morteh 08:08 hm, seems to be after i disable/enable the plugin in chrome://extensions
taxilian 10:08 ahh, this is part of an extension? that might cause it to behave differently than I'm accustomed to
morteh 10:08 figured it out, the npapi plugin actually injects another DLL into chrome
brain melting stuff lol
McEasy 16:08 Is there anyway for a plugin to pass variables or strings to the browser besides just returning them? I'm thinking this plugin would pass information to the browser while it's still inside a function.. but not sure if that's even possible.
taxilian 17:08 McEasy: you could call a function in the page
or assign it to a variable on a global object
m_host->getDOMWindow()->SetProperty("foo", "bar")
http://www.firebreath.org/display/documentation/class%20FB%20DOM%20Window
guess it's ->setProperty, not ->SetProperty
McEasy 17:08 taxilian: Oh, calling a javascript function in the page would be awesome! That'd be really helpful with what I need to do. Do I use the dom window to do that? Not sure how I could call a javascript function within the plugin
taxilian 17:08 http://www.firebreath.org/display/documentation/Invoking+methods+on+the+DOM
McEasy 17:08 taxilian: Beautiful, this could fix a lot of headaches! Thanks for the help, as always.
McEasy 17:08 taxilian: Forgive the hand-holding.. but I can't figure out how to call a specific javascript function using the link provided. Like let's just say I have an "updateText" javascript function. How can I call it? I've got the window setup, but unsure if I need to use "HasProperty" or something else.
nvm, got it working! Thanks again taxilian.
taxilian 17:08 =]
good luck
McEasy 18:08 taxilian: Hah, you have no idea how much this is going to help this whole project. I was returning debug statements to figure out what was going on with the plugin when it wasn't working as expected. Now I can get a live view of whats going on and don't have to return! phew!
taxilian 18:08 you can use m_host->htmlLog as well for debugging
though I don't recommend using it in production
McEasy 18:08 taxilian: Well I'm going to need a mix of debugging and actual production stuff, so I'll look into that as well.
taxilian: Seriously.. this project just got a whole lot better. Thanks for the help! I'm done for today (got things working in the nick of time!)
taxilian 18:08 glad it's helpful
contribute back in whatever way you can, please
improving the docs is a good and cheap way =]