Prototype

Snippet: Font Detection with Prototype

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, false.

Spellify: How Not To Use Prototype

About two and a half weeks ago I wrote about jQuery being underutilized. That's nothing compared to Spellify, the absolutely perfect and horrendous example of how grossly unutilized Prototype is. Read on.

Libraries: On Size and Usage

As beginners, people who write Ajax applications (for the first time) tend to blindly slap on the Prototype JavaScript framework because of its fame and popularity. What then follows is the usual complaining on Prototype's size (over 60 kilobytes).

Prototype Breaks Not

The recent Ajaxian post on Prototype mentions how most people argue Prototype's badness. The first point is the most common: breaking the for...in loop.

Ribbon Component for Prototype

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
  • Collapsible
  • 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

Prototype's Synchronous Quirk

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.

Prototype: Enable/Disable Elements

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)

Syndicate content