|IRC Nick||Time (GMT-7)||Message|
|linearray||03:11||FireBreathBot: tell alejo yes.|
|FireBreathBot||03:11||linearray: I'll pass that on when alejo is around.|
is it possible to inject some html from a firebreath plugin?
|raffa||09:11||i have a probelm with the DOM::Elemet::getInnerHTML function
|raffa||09:11||i would like to inject some html code inside the html
i get the ElementPtr this way FB::DOM::ElementPtr plugin_dom = m_host->getDOMElement();
and then i call
std::string html = plugin_dom->getInnerHTML();
the method crashes the plugin
|taxilian||09:11||I'm not surprised that it does weird things at least
why would you ever want to change the innerHTML of the object tag?
|raffa||09:11||actually i would like to change the html of the parent|
|taxilian||09:11||well, what you're doing changes the html of hte object tag, not the parent
you might be able to use ->getElement("parentNode")
|raffa||09:11||but first i tried to see if the function does what i suppose
|taxilian||09:11||but you realize that if you do that you'll be removing the plugin from the dOM?
I'm not sure what will happen if the plugin removes itself
I wouldn't recommend it
that is not what i want to do..
that's just a test
|taxilian||09:11||then test it by doing what you want to do
not by doing silly things that are likely to mess up your plugin
what do you actually want to do?
|raffa||09:11||i want to create in the parent object a div
and if i try to get the inner html of the parent object
FB::DOM::ElementPtr parent = plugin_dom->getParentNode();
std::string parent_html = parent->getInnerHTML();
|taxilian||10:11||my bet is that parent is not being found
doing things like that with the dom element is a little iffy
I'd start with the document instead, if it were me
|raffa||10:11||@taxilian:you are right. The problem was that it didn't find the parent node..|
|taxilian||10:11||it may be that parentNode isn't on the list of reserved names
|FireBreathBot||10:11||Found 1 matching file(s) in the master branch. First 1 are:
|taxilian||10:11||try adding setReserved("parentNode"); to your JSAPI constructor|
|raffa||10:11||it works!!thanks a lot
(but i didn't understand why :$)
|taxilian||10:11||the problem is that JSAPI responds to all properties
even ones that it doesn't know about
this makes it so you can assign arbitrary properties, which simplifies a lot
but it also makes it so that it overrides normal DOM properties
by setting it as a reserved attribute it prevents that from happening
|raffa||10:11||grazie mille!thanks a lot!|
|nirvdrum||11:11||I'm going to spam the channel. If you guys could upvote the "Web Consistency Testing" story onhttp://news.ycombinator.com/, that'd be fantastic.
|taxilian||11:11||oh, I think I could do that
I am the author of this framework, and I support this idea ;-)
of course, I have to figure out my login first...
|raffa||11:11||have a nice day
|taxilian||11:11||I figured it out =]
I've logged in once before… back when I wrote the "a year in the life of an open source project" blog post
that's been about a year
maybe I should write a followup =]
|nirvdrum||11:11||Heh. I remember that post.
It was quite good.
|taxilian||11:11||why thanks =]|
|FireBreathBot||14:11||alejo: 10:17Z <linearray> tell alejo yes.|
i need direct print since web page
can i with this framework?
|taxilian||14:11||There is nothing in FireBreath to help it
but you should be able to do it with windows APIs
|tpaul||14:11||I need to install a couple of files along with my plugin when a user clicks the .msi that is generated, I'm assuming this is all configured in the "CMake and WiX Land" that I've been avoiding :)|
|taxilian||14:11||I'm afraid so
assuming you're using WiX for your install
|tpaul||14:11||well, I got pretty far without digging into them lol
yeah using WiX, the default setup is simple and works well, but I need to do a little more, if I'm successful (and I plan to be) I'll try and add my example to the Wiki