Fuel - Firefox 3 (June '07)

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    5 Favorites

    Fuel - Firefox 3 (June '07) - Presentation Transcript

    1. FUEL Paris - June 23, 2007 John Resig - Mozilla Corp.
    2. What is FUEL? • JavaScript API for Mozilla development • Focus on solving most common problems • Emphasis on Firefox Extension Dev • Improve portability • Targeting Web Developers
    3. Implementation • Written in pure JavaScript • (Users can crack it open and see how it works.) • Wrappers around XPCOM objects
    4. Simplify Concepts • Provide a consistent means of doing these: • Events • foo.events.addListener( “test”, fn ); • Iteration • foo.all.forEach( fn ); • Add/Remove • foo.add( obj ) / obj.remove()
    5. FUEL 0.1 • Preferences, Events, Storage • In Firefox 3.0a4 • API: http://wiki.mozilla.org/FUEL/0.1/API
    6. Application Events • Make sure the application is ready to be interacted with (all aspects are loaded): Application.events.addListener(“ready”, fn); • Handle when a user exits thefn); application: Application.events.addListener(“quit”,
    7. Preferences • Coverage of the most common preference tasks. • Get/Set Preferences: Application.prefs.getValue(“my.pref”, default); Application.prefs.setValue(“my.pref”, “value”); • Extension Preferences: true); myExt.prefs.setValue(“autosave”,
    8. Preferences (cont.) • Get all preferences that have been modified by the user: Application.prefs.all.forEach(function(p){ if ( p.modified ) // do something });
    9. Storage • Temporary, runtime, data storage and retrieval. • Application-wide storage: Application.storage.set(“data”, 4); • Extension-level storage: myExt.storage.get(“data”, 0);
    10. FUEL 0.2 • Window/Browser Tabs, Bookmarks • Will be in Firefox 3.0a6 (under final review) • API: http://wiki.mozilla.org/FUEL/0.2/API
    11. Browser • Get the current active browser window: Application.activeWindow • Get the URL of the active tab: Application.activeWindow.activeTab.url
    12. Browser (cont.) • Open and activate a new tab: Application.activeWindow .open(\"http://google.com/\").focus(); • Close all Google-related tabs: Application.activeWindow.tabs.forEach(function(tab){ if ( tab.url.match(/google/) ) tab.remove(); });
    13. Bookmarks • Add a new bookmark: Application.bookmarks.add(\"Mozilla\", \"http://mozilla.org/\"); • Remove all Google-related bookmarks: Application.bookmarks.all.forEach(function(cur){ if ( cur.url.match(/google.com/) ) cur.remove(); });
    14. Overview • Application Events (0.1) • Preferences (0.1) • Storage (0.1) • Bookmarks (0.2) • Window / Browser Tabs (0.2)
    15. More Info • All about FUEL: http://wiki.mozilla.org/FUEL • Test Suite: http://mxr.mozilla.org/seamonkey/source/browser/fuel/test/ • Contact: • Mark Finkle (mfinkle@mozilla.com) • John Resig (jresig@mozilla.com)

    + jeresigjeresig, 3 years ago

    custom

    5619 views, 5 favs, 10 embeds more stats

    More Info

    © All Rights Reserved

    Go to text version
    • Total Views 5619
      • 4392 on SlideShare
      • 1227 from embeds
    • Comments 0
    • Favorites 5
    • Downloads 75
    Most viewed embeds
    • 1215 views on http://ejohn.org
    • 2 views on http://www.hanrss.com
    • 2 views on http://brentwoodtennesseerealestate.org
    • 2 views on http://holographicmemorydiscs.com
    • 1 views on http://209.85.215.104

    more

    All embeds
    • 1215 views on http://ejohn.org
    • 2 views on http://www.hanrss.com
    • 2 views on http://brentwoodtennesseerealestate.org
    • 2 views on http://holographicmemorydiscs.com
    • 1 views on http://209.85.215.104
    • 1 views on http://xss.yandex.net
    • 1 views on http://66.102.9.104
    • 1 views on http://www.zhuaxia.com
    • 1 views on http://feeds.feedburner.com
    • 1 views on http://blogcommentservice.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as innappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel

    Categories