Skip to main content

Home/ javascript/ Group items tagged prototype

Rss Feed Group items tagged

Javier Neira

Ajaxian » ECMAScript Edition 5: WebKit JavaScriptCore Progress - 0 views

  •  
    * Object.getPrototypeOf * Object.getOwnPropertyDescriptor * Object.keys * Object.defineProperty * Object.defineProperties * Object.create * Object.getOwnPropertyNames * JSON.stringify * JSON.parse * Date.now: Has been in JSC for a long time. * Date.prototype.toISOString * Date.prototype.toJSON * String.prototype.trim * "Array extras": Array.prototype.{indexOf,lastIndexOf,every,some,forEach,map,filter,reduce,reduce
Javier Neira

Three map implementations in javascript. Which one is better? - Stack Overflow - 1 views

  • if (!Array.prototype.map) {  Array.prototype.map = function(fun /*, thisp*/)   {    var len = this.length >>> 0;  // make sure length is a positive number    if (typeof fun != "function") // make sure the first argument is a function      throw new TypeError();    var res = new Array(len);  // initialize the resulting array    var thisp = arguments[1];  // an optional 'context' argument    for (var i = 0; i < len; i++) {      if (i in this)        res[i] = fun.call(thisp, this[i], i, this);  // fill the resulting array    }    return res;  };}
  •  
    if (!Array.prototype.map) { Array.prototype.map = function(fun /*, thisp*/) { var len = this.length >>> 0; // make sure length is a positive number if (typeof fun != "function") // make sure the first argument is a function throw new TypeError(); var res = new Array(len); // initialize the resulting array var thisp = arguments[1]; // an optional 'context' argument for (var i = 0; i < len; i++) { if (i in this) res[i] = fun.call(thisp, this[i], i, this); // fill the resulting array } return res; }; }
Hussain M Elius

Prototype extension: Carousel - 0 views

  •  
    Coda Slider like script for prototype
Javier Neira

Inheritance - MDC - 1 views

  • Note that __proto__ may not be available in JavaScript versions other than that in Mozilla. An alternative, but less optimal version of extend(), which should work everywhere, is: function extend(child, super) { for (var property in super.prototype) { if (typeof child.prototype[property] == "undefined") child.prototype[property] = super.prototype[property]; } return child; }
Dirk Sorensby

JavaScript Object Chaining using Prototypal Inheritance - 2 views

  •  
    how to use the prototype and constructor properties to trace an object's ancestry up to the base Object. H
Ivan Pavlov

Proto.Menu :: prototype based context menu - 0 views

  •  
    Proto.Menu is a simple and lightweight prototype-based solution for context menu functionality on your page
yc c

Underscore.js - 4 views

  •  
    Underscore is a utility-belt library for Javascript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in Javascript objects. It's the tie to go along with jQuery's tux.
  •  
    Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux. Collections each, map, reduce, detect, select, reject, all, any, include, invoke, pluck, max, min, sortBy, sortedIndex, toArray, size Arrays first, last, compact, flatten, without, uniq, intersect, zip, indexOf, lastIndexOf Functions bind, bindAll, delay, defer, wrap, compose Objects keys, values, extend, clone, isEqual, isElement, isArray, isFunction, isUndefined Utility noConflict, identity, uniqueId, template
anonymous

Underscore.js - 3 views

  •  
    Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux, and Backbone.js's suspenders.
Ivan Pavlov

Prototip 2 - Create beautiful tooltips with ease - 0 views

  • Prototip allows you to easily create both simple and complex tooltips using the Prototype javascript framework.
Ivan Pavlov

onJSReady - 0 views

shared by Ivan Pavlov on 02 Aug 08 - Cached
  •  
    A modified version of Stefan Hayden's onJSReady Prototype plugin.
Ivan Pavlov

Foo Framework » Home - 0 views

  •  
    Foo Framework is a Javascript Framework, built on top of the Prototype Framework, specially designed to ease the development of Rich Internet Application.
Javier Neira

fingernails in oatmeal, Metaprogramming: Ruby vs. Javascript - 0 views

  • drew['battleCry']();
  • What we want is the ability to define a method dynamically (given a name) that is also a closure over the lexical scope at the point of method definition.
  • color_name = 'black'&nbsp;Ninja.send(:define_method, 'color') do&nbsp;&nbsp;puts "#{name}'s color is #{color_name}"end
  • ...5 more annotations...
  • var colorName = "black";&nbsp;Ninja.prototype['color'] = function () {&nbsp;&nbsp;puts(this.name + "'s color is " + colorName);}
  • The ubiquity of closures in Javascript is extremely powerful and, as we have seen so far, makes metaprogramming very easy.
  • You can think of a metaclass as a class definition specific to a single instance of a class.
  • This means we can add methods to an object’s metaclass without adding the same behavior to all instances of that object’s class.
  • This means that Javascript does not distinguish between classes/prototypes and instances and, therefore, we can add our desired behavior directly to the instance.
yc c

moo.fx - size does matter - 1 views

  •  
    moo.fx is a superlightweight, ultratiny, megasmall javascript effects library, to be used with prototype.js or the mootools framework. It's very easy to use, blazing fast, cross-browser, standards compliant, provides controls to modify any CSS property of any HTML element, including colors, with builtin checks that won't let a user break the effect with multiple, crazy clicks. Optimized to make you write the lesser code possible, the new moo.fx is so modular you can create any kind of effect with it. moo.fx is open source, released under the very liberal MIT License, so feel free to do anything you want with
Javier Neira

Google Closure: How not to write JavaScript - 3 views

  • “It’s a JavaScript library written by Java developers who clearly don’t get JavaScript.”
  • Unfortunately, unlike the built-in properties supplied by Object.prototype, custom properties added to Object.prototype will show up as an object property in any for-in loop in the page.
  • custom properties added to
  • ...3 more annotations...
  • will show up as an object property in any
  • loop in the page.
  • var&nbsp;a&nbsp;=&nbsp;"I&nbsp;am&nbsp;a&nbsp;string!"; &nbsp; 2 alert(typeof&nbsp;a);&nbsp;//&nbsp;Will&nbsp;output&nbsp;"string" &nbsp; 3 var&nbsp;b&nbsp;=&nbsp;new&nbsp;String("I&nbsp;am&nbsp;also&nbsp;a&nbsp;string!"); &nbsp; 4 alert(typeof&nbsp;b);&nbsp;//&nbsp;Will&nbsp;output&nbsp;"object"&nbsp;
yc c

gotAPI.com - Documentation search engine - 2 views

  •  
    gotAPI helps you find functions, classes, methods, properties, styles, tags, constants and more \n Search In\nActionScript 2.0, ActionScript 3.0, Adobe Flex 2, Adobe Flex 3.3, Apache Ant, Apache Commons, Apache RegExp, Apache Struts 1.1, Berkley DB XML, Bluetooth and OBEX, C++, CakePHP 1.2, Castor, CDC, CLDC, ColdFusion MX-7, ColdFusion MX-8, CSS, CSS, DbUnit 2.4.5, Dinkumware C/C++, DITA 1.1, DocBook, Dojo Toolkit 1.3, Drupal, Eclipse Platform 2.1, Erlang, Flickr API, FP, Google GWT, Google GWT+Gears, Groovy, Haskell, Hibernate, HTML, HTML, HttpUnit, J2EE 5.0, Java 1.5, Java 1.6, JavaScript, JavaScript, jQuery, JSON LIB, JSTL, JUnit, Log4J, MIDP, Mobile Media, MochiKit, MooTools, MySQL 4.1, OpenGL 2.1, Oracle 10g, Oracle 9i, Orb API 2.0, OSGi Platform 4.1, PBP, Perl 5.10, PHP, PostgreSQL 8.3, Prototype.js, Python 2.6.1, RMagick 1.15, RogueWave, Ruby Std Libraries, Ruby/Rails, Scala 2.7.3, Schema (XSD), Script.aculo.us 1.8, Selenium 0.8.2, Sicstus Prolog, Simple DirectMedia Layer, Spring Framework 2.0, Symphony 1.2, Twitter API, Web Services, XML DOM, XPath 2.0, XSL 2.0, Yahoo! UI\n
Ivan Pavlov

joose-js - Google Code - 0 views

  • Joose is a self-hosting meta object system for JavaScript with support for classes, inheritance, mixins, traits, method modifiers and more. Joose makes object-oriented programming with JavaScript easy, declarative and very productive. The Joose meta-object system is multi-paradigm. It supports class-based and prototype-based programming styles as well as class-based inheritance and role-based extention. The Joose framework has been successfully used in multiple production systems for twelve months now and has been proven to be very stable. Joose is being tested using an automated unit-test suite that is being run in all major browsers (Firefox, IE, Safari, Opera and Chrome).
Ivan Pavlov

Javascript Window Library - 0 views

  • Mydows is a small library of javascript functions that sit above the Prototype Javascript library and aid in the creation and management of free floating windows contained within the webpage. Mydows will also work with the Scriptaculous library for added features.
1 - 20 of 28 Next ›
Showing 20 items per page