Ever since 3.5, cross-domain HTTP requests have been supported in Firefox. Getting this to work may seem easier and saner than piggy-backing Flash ("simply request a URL of different origin in your
One of my recent efforts is Prototype Essentials. It is, pardon my pun, essentially Prototype stripped of its browser-specific parts such as Ajax, DOM stuff, selectors, form helpers, and an event system. Why would anyone want a stripped down version of Prototype?
Array.last in Prototype), interpolate strings (
String.interpolate in Prototype), or construct ranges (
ObjectRange in Prototype). Now all I need to do now is load Prototype Essentials and I'd have a much richer set of utilities.
This is essentially a clean house implementation of the font detection method described at lalit dot lab using Prototype 1.6. Another method described at maratz.com seems very interesting, since it uses Flash.
This is only usable after the DOM is ready. Call
Font.detect with a string containing the name of the font to be detected. If it's detected as present,
true is returned, otherwise,
The recent Ajaxian post on Prototype mentions how most people argue Prototype's badness. The first point is the most common: breaking the
I'm working on a Ribbon component that utilizes Prototype. The Ribbon I'm referring here is the Ribbon UI in Office 2007. Toolbars are passé.
Here is a highlight on the key features of the Ribbon component:
- Multiple tabs, multiple groups
- Stickybar that is persistent to the left (like the "Quick Access Toolbar" in Office), and a specific Help button
- Detects mouse wheel scrolling and switches tabs
- Supports different modes where different tabs are available
I was experimenting with Prototype's AJAX call, but with the option asynchronous: false. It was buggy under Internet Explorer, although I never expected anything to work under Internet Explorer anyway.
Either Prototype never finished the XMLHttpRequest, or Prototype didn't call the function it was supposed to after the request.
I have written some code for Prototype. Prototype can toggle, show, hide, and remove elements (these are just one of the many features Prototype can do to elements).
I went even further: making it possible to disable, enable (if it's already disabled), and toggle disable elements. This is the code. (It's under the same MIT-style license as Prototype)