:<space>, : and / are interchangeable.
Which makes all these options equivilent:
Package: tag: ComponentPackage: tag:ComponentPackage: tag/ComponentPackage:tag: Component
| var MyClass = new Class({ | |
| initialize: function(){ | |
| this.foo = /*<b compat=1.2>*/'123' && /*</b>*/'345'; | |
| /*<b compat=1.2>*/this.foo = '123';/*</b>*/ | |
| this.foo = '345'; | |
| }, | |
| //<b fix=ie6> | |
| method: function(/*<b compat=1.2>*/arg12, /*</b>*/arg20){ | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
| <title>Benchmark prototype Method vs Object Property Fn</title> | |
| <script type="text/javascript" src="JSLitmus.js"></script> | |
| <script type="text/javascript"> |
| // Basic closure, assumes window === this | |
| (function(){ | |
| // require stuff here | |
| })(); | |
| // Custom closure, this === anything you want | |
| (function(){ | |
| // require stuff here |
| // -*- Mode: MooTools Javascript; tab-width: 4; -*- | |
| /* | |
| --- | |
| provides: delayUnless | |
| author: Thomas Aylott <subtlegradient.com> | |
| copyright: 2009 Thomas Aylott | |
| license: MIT Style | |
| requires: [MooTools, Element, Events] | |
| ... | |
| */ |
| // -*- Mode: Javascript; tab-width: 4; -*- | |
| /* | |
| --- | |
| privides: [String.bound, String.prototype.bind] | |
| description: Lets you bind to a method that doesn't exist yet, and then swap out methods without re-wiring all your codez | |
| author: Thomas Aylott <subtlegradient.com> | |
| copyright: 2009 Thomas Aylott | |
| license: MIT Style | |
| ... | |
| */ |
| Function.safeTry = (function(){ | |
| var currentHandler; | |
| var dispatchFakeEvent; | |
| var currentHandlerResult; | |
| if (document.addEventListener){ | |
| document.addEventListener("fakeEvents", function(){ | |
| currentHandler(); // execute the callback | |
| }, false); |