Page tree
Skip to end of metadata
Go to start of metadata

FireBreath Features-at-a-glance

Please note that unless otherwise noted, these features are only guaranteed to be found in the latest version of FireBreath.  If indicated, a specific feature may only be available in the development branch.

Automatic project creation

Perhaps the nicest feature of FireBreath is the fbgen tool, which makes creating your first plugin project a breeze!

Platform Support

A plugin built on FireBreath will work as an NPAPI plugin or as an ActiveX control (for windows/IE support). It is known to work well on:

  • Windows
    • Internet Explorer 6 and later
    • Mozilla Firefox 3.0 and later
    • Google Chrome 2 and later
    • Apple Safari
    • Opera - Some features may not work on some versions of opera
  • Mac OS X
    • Browser support:
      • Mozilla Firefox 3.0 and later
      • Google Chrome
      • Apple Safari 4 and later (3 probably works as well, just haven't tested it in awhile) both 32 and 64 bit
    • Drawing support:
      • Core Animation
      • Invalidating Core Animation
      • CoreGraphics
      • QuickDraw (32 bit only)
    • Event Model Support:
      • Cocoa
      • Carbon (32 bit only)
  • Linux
    • Mozilla Firefox 3.0 and later
    • Google Chrome

Javascript Interface

FireBreath supports the following Javascript features (and more) through its JSAPI (JavaScript API) class

  • Easy creation of interface (JSAPI) objects with JSAPIAuto
    • Create one object and have it work on all supported browsers
    • Automatic type coercion for parameters and return types
      • If a parameter can't be coerced into the desired type an exception is thrown to javascript
      • FB::variant will match any type to allow polymorphic functions
    • Support for variable-length arguments with FB::CatchAll
    • Accept a std::vector<type> as a parameter to automatically convert from a javascript array to a vector of that type
      • all STL containers should work here, for example std::set instead of std::vector
    • Accept a std::map<std::string, type> as a parameter to automatically convert from a javascript object to a map of strings to that type
      • all STL "Dictionary" type containers should work here
    • Return values of type FB::VariantList (vector of variants) will automatically be returned to Javascript as a true Javascript array
    • Return values of type FB::VariantMap (vector of std::string => variant) will automatically be returned to Javascript as a true Javascript object
    • Support for nesting a FB::VariantMap as a value in a FB::VariantList
    • Support for nesting a FB::VariantList as a value in FB::VariantMap
    • Support for Security Zones
      • Public, Protected, Internal, Local (or define your own)
      • Can be set according to the site URL
      • Can restrict access to certain APIs (properties or methods) to only instances on a certain domain, having provided certain credentials, etc
  • Support for DOM-style event handling
    • Attach events with addEventListener or attachEvent (depending on browser; note that IE9 doesn't pass addEventListener listeners to the activex control)
    • Detach events with removeEventListener or detachEvent (depending on browser)
    • Fire events to javascript asynchronously from any thread in your plugin
  • Support for array-style accessing of properties
  • Support for hierarchal structure of javascript interface or for limited-lifetime objects returned from JSAPI methods or properties
    • Instances of JSAPI-derived objects can be returned to the browser and live independent of the <object> tag
    • Instances of JSAPI-derived objects can be used as static parts of the interface to group methods and properties or to provide a "DOM"-like structure to your interface
  • Support for passing javascript methods and objectsinto the Javascript API (new in 1.4)
    • Store callback functions to provide an asynchronous interface for Javascript, then call them -- asynchronously or synchronously -- from any thread in your plugin
    • Access methods and properties of javascript objects, including DOM objects

DOM access and manipulation abstraction (new in 1.3)

FireBreath provides tools for getting the Document and Window objects that host the plugin as well as accessing and manipulating other DOM objects.

Threading support (since 1.3)

Most complex plugins will need at least one additional thread in order to work effectively, but the Browser APIs can only be accessed from the main thread.  In order to assist with this, FireBreath provides features to make sure your browser access will be thread-safe.  Note that synchronous cross-thread calls could have performance penalties!

Drawing Support

FireBreath does not currently have any drawing abstractions, but will provide you with everything you need to draw on each platform.  Note that the linux drawing support is still a little flaky as we haven't found anyone who understands it well enough to help us fix it.

Windowless plugin support on NPAPI browsers is in the dev branch and will be stable in FireBreath 1.4. Windowless support for Internet Explorer has not yet been completed but shouldn't be a major undertaking if someone with a little ActiveX experience volunteers to help implement it.

System Events

FireBreath provides abstraction for Mouse and Keyboard events on Mac and Windows.  Linux events should be easy to add if we find someone who knows how and cares.

Installer

FireBreath is packaged with an automatic install generator for Windows which provides you with a customizable template to help you create your plugin installer using WiX.

  • No labels

2 Comments

  1. Has support for Opera Linux been added yet or not

    1. As I have told you on now three different mediums (stackoverflow, irc, and here). There is no official support for opera; it's not large enough for us to bother testing with it.  However, opera uses NPAPI so it will probably work.  If it doesn't you'll have to do your own troubleshooting, but we'll help as we can.