Build a plugin as a form input element with firebreath - npapi

we can develop a plugin as a form element with qtbrowserplugin.
http://doc.qt.digia.com/solutions/4/qtbrowserplugin/developingplugins.html#using-plugins-in-forms
Can we do the same thing with firebreath? Are there any example available?
Thanks.

Interesting. I have never heard of this before. FireBreath does not have any such feature at present, but if you can figure out what qtbrowserplugin is actually doing behind the scenes it should be fairly trivial to add support to firebreath for the same thing.

Related

Mootools and three.js conflict

Does anyone have any experience using mootools alongside three.js? Right now it seems to conflict as mootools seems to remove animation, mouse functionality and more from my three.js project.
I used jQuery initially without any problems, but have since converted it to plain javascript. However now I have to make sure that the code is Mootools compatible. The only thing I do is to include the mootool (1.4.5) library, but that is enough to create some conflict.
So does anyone have any experience with mootools and three.js not playing well together?
Thanks in advance.

Advantages of HTML 5 Drag and Drop over jQuery UI Drag and Drop

I'm writing a new web application that needs to support drag and drop operations for elements on the page (not file drag and drop).
This the answer to this question
html5 vs jquery drag and drop
recommends using Modernizr to check whether the browser supports HTML5 drag and drop and either use that support or fall back to an alternative like jQuery UI.
Since they have quite different models, that means that all drag and drop code would have to be implemented and tested separately (very little shared implementation). It only seems logical to do that if there are significant, user-impacting benefits to HTML5 drag and drop and if the fallback to jQuery UI would provide a degraded experience.
Are there significant benefits to implementing both variants?
I would guess that eventually jQuery will take advantage of built-in browser capabilities like html 5 drag and drop.
And if different browsers implement it differently...jQuery will deal with it.
I think the biggest advantage to HTML5 drag and drop over jQuery is the elimination of the sizable jQuery UI library and css files.
That being said, there is the current issue of browser compatibility that makes jQuery very much needed.
Ok, having implemented both, I'd recommend doing it manually with mousedown/mousemove events (basically as jquery UI does it).
I agree that jQuery UI can be a bit heavy, but there are lots of tutorials/code snippets available to code it yourself.
Why do I recommend a manual approach rather then the native implementation in modern browsers? Because html5 DnD sux! It might be new for current browsers, but is modeled after an old implementation back in IE5.
If you are talking about moving things between windows for from the desktop, then maybe I'd consider using html5 DnD as it has browser/OS hooks. Else if you are simply moving DOM nodes on a single webpage, do it manually with js mouse events.
-Paul
I am answering specifically regarding dnd, since that seems to be what you were asking on.
I think some people are confusing jQuery with jQueryUI. Using native HTML5 dnd together with jQuery is great combination, both in performance and development time. Since the dnd features came from the IE world the browser support is pretty good across the board (including IE7 for sure, and maybe even older). Using jQuery gives you all the cross browser addClass(), removeClass(), etc. utils that are crucial.
jQueryUI on the other hand offers a ton of features, that you probably will not need. Since their dnd relies on mouse events and not native dnd the performance wont be as good. jQueryUI should not be confused with jQuery. jQueryUI has not received any major updates in over 2.5 years! (Yes, jQueryUI 1.8rc1 was in JAN 2010) So, its not so simple just to say they will add native support in the future, at the pace they have been updating I wouldn't hold my breath.
I just converted one script to use a HTML5-based drag/drop sortable script instead of the jQueryUI one, because with the size of what I was trying to sort, it took 19 seconds to initialise the jQueryUI version, and .19 seconds to initialise the HTML5 version.
So advantage: speed

How can I use FancyUpload (with mootools) side by side with prototype.js?

I have a site that I am using prototype and scriptaculous on. One one page of my site, I would like to use Digitarald's FancyUploader (I have not found anything else that is as elegant, and offers multiple file selection). Is it possible to use the two on the same page? If so, how would I do it?
There is no way to run a Mootools script with prototype.
While Mootools provide a dollar-safe mode, that mode only provided compatibility with frameworks that provides a $() function.
The reason why Mootools and prototype are incompatible is that they both extend native JavaScript natives with their own methods. Unfortunately, there is no way of overriding this behavior.
SWFUpload is an alternative solution which is compatible with pretty much all JavaScript frameworks. It is pretty much functionally equivalent to FancyUpload. You might want to consider it as an alternative solution. If not, you'll have to make a choice between Mootools and prototype.

AWT bridge's "Hello World"

I've heard about the JavaFX->AWT bridge (or hack) for a moment now.
But examples I find are quite fuzzy or blur to me.
So, if anyone knows an "Hello World" example for this bridge I'd be really interested !
(Just to be clear I don't need a way to embed a Swing component in a JFX animation or to launch a JFX from a Swing based program, I really need to embed some JFX inside a panel).
Thanks in advance ^^
If you need to embed JavaFX inside Swing, I recommend to take a look at this hack.
The link above does not work for JavaFX 1.2, see my blog entry on this.
Nonetheless, this is still a hack.
The JFXtras project is incorporating support for this.

How to check if mootools.js is actually being used within a web site?

I inherited a web site project that includes mootools.js (about 40k) in most of the scripts. However, I have not seen, intuitively, where it is being used and given the nature of this porject, ahem, I'm thinking it might not be being used at all!
I'm "under the gun" to ship this tonight (yup, it's a pre-Thanksgiving release). I have not used mootools.js so I'm not sure what to grep for or if there's a sure tell way to determine this. I don't want to have to JSLint it (or do I LOL). Any suggestions would be appreciated. Thanks.
Mootools grafts itself onto some of the native js stuff, so it might be hard to do just by code inspection unless you are very familiar with what MooTools gives you.
Remove it, run your automated tests.
Cause you have those, right?...
Remove it and see if anyone complains.
(You could try it on a test machine first, if you're not feeling brave.)
You can check your source code on some MooTools methods, for example, addEvent().
If it is used so here is the Mootols :)
Just check from the home page of http://mootools.net/
I also was interested on one site why they use jquery and mootools. So, I found addEvent() method. It is Mootols method.
You must have a dev version of the site. Just pull it out and go over pages see if stuff breaks. Mostly you will get unknown function type stuff, if there is any dependencies. Firebug is your friend.
1, Open firebug
2, Click the DOM tab
3, Check if the Mootools object exists (It will say the current version of mootools next to it).
Hope this helps
:)