This proposal has moved to https://github.com/sebmarkbage/ecmascript-rest-spread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==ClosureCompiler== | |
// @compilation_level ADVANCED_OPTIMIZATIONS | |
// @output_file_name default.js | |
// ==/ClosureCompiler== | |
/** | |
* @constructor | |
*/ | |
function Foo(name) { | |
this.name = name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Element.implement({ | |
/** | |
truncates element text to fit in element width. | |
end (bool) defaults false. True = cuts string at end, False = cuts string in middle | |
str (string) truncation string default : '...' | |
**/ | |
truncate : function(end,str){ | |
str = str || '...'; | |
var style = this.style; | |
var originalStyles = { overflow: style.overflow, 'white-space': style.whiteSpace, padding: style.padding }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*= | |
name: Animation | |
description: Simple animations implementation that work with standard-sized browsers (using Fx) and use webkit css animations where available. | |
license: MooTools MIT-Style License (http://mootools.net/license.txt) | |
copyright: Valerio Proietti (http://mad4milk.net) | |
authors: Valerio Proietti (http://mad4milk.net) | |
requires: MooTools 1.2.3+ (Core) (http://mootools.net/download) | |
=*/ | |
var Animation = new Class({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRELOADING REQUIRED: | |
Sheer({ | |
original: 'urn:Sheer:Lang:Array', | |
require: { | |
'urn:Sheer:Lang': ['Type', 'Object', 'Function'] | |
} | |
}, function(Type, Object, Function) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@import Event.Drag.js | |
Script: Element.Draggable.js | |
Enables HTML 5 drag operation events in legacy browsers. | |
License: | |
MIT-style license. | |
Authors: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dontEnum = ['toString', 'toLocaleString', 'valueOf', 'toSource', 'watch', 'unwatch', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable']; | |
var failsEnumTest = (function(){ | |
for (var k in { toString: {} }) return false; | |
return true; | |
})(); | |
Object.each = function(obj, fn){ | |
for (var key in obj) fn(obj[key], key); | |
if (failsEnumTest) | |
for (var i=0,l=dontEnum.length;i<l;i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.XDomainRequest) (function(){ | |
var onLoad = function(){ | |
cleanup(this.xhr); | |
this.response = {text: this.xhr.responseText, xml: this.xhr.responseXML}; | |
this.success(this.response.text, this.response.xml); | |
}; | |
var onError = function(){ | |
cleanup(this.xhr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--- | |
script: Array.Reduce.js | |
description: Extends Array with reduce and reduceRight methods in browsers that don't support them. | |
license: MIT-style license. | |
requires: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Autocompleter.implement({ | |
choiceOver: function(choice, selection){ | |
if (!selection && this.options.forceSelect) this.selectedValue = this.opted = choice.inputValue; | |
return this.parent.apply(this, arguments); | |
}, | |
hideChoices: function(clear){ | |
if (clear && this.options.forceSelect && (!this.visible || !this.selected) && this.element.value != this.opted) { | |
this.opted = ""; |
OlderNewer