|
Menu principal
Google Search
LabsSphère Catégories
|
Blog : Tobie Langel Blog
2007-05-15T20:16:00+02:00
| 9 lectures
Looks like Rico - a UI JavaScript lib built on top of Prototype - is getting ready for a long awaited 2.0 release.As seen on their website: Site Update and Rico 2.0. We are updating the site to support Rico 2.0. We have also suffered some server troubles. Please bear with us as we prepare the site for the new release.I'm really looking forward to find out what Richard Cowin and team have been cooking.
2007-04-12T20:11:00+02:00
| 4 lectures
Element.addMethods({ loading: function(element) { element = $(element); element._innerHTML = element.innerHTML; element.update(); element._interval = window.setInterval( function(){ var html = this.innerHTML; this.update(html.length > 2 ? '' : html + '.'); }.bind(element), 100) return element; }, stopLoading: function(element, revert) { element = $(element); window.clearInterval(element._interval); if(revert) element.update(element._innerHTML); element._innerHTML = element._interval = undefined; return element; }});
2007-05-15T20:15:00+02:00
| 13 lectures
This one's pretty annoying:/(.)+/.test(string);This crashes Safari when string's length is bigger than about 7000 characters (your mileage may vary, it looks like the exact size is machine dependent, but its in that area on an intel MacBook).The cause of the crash seems to be the length of the grouping results, as this works fine:/.+/.test(string);UPDATE: Non-capturing parentheses do not solve this bug. So this:/(?:.)+/.test(string);will still crash Safari.This bug has some really annoying consequences. While we managed to fix some of them in the Prototype framework, it still leaves the issue of JSON sanitizing.Currently, this is done both in Prototype and in Douglas Crockford's original ...
2007-04-19T22:57:00+02:00
| 26 lectures
Following my last post on a critical Safari's regexp bug (it actually crashes the browser), Andy Armstrong suggested a partial solution to the problem:Here's a tentative fix to JSON's sanitize regexp based on it:/^("(\.|[^"\\n\r]*)*?"|[,:{}[]0-9.\-+Eaeflnr-u \n\r\t]*)+?$/instead of the original:/^("(\.|[^"\\n\r])*?"|[,:{}[]0-9.\-+Eaeflnr-u \n\r\t])+?$/Although it does not entirely solve the problem, it does allow longer strings to be parsed without crashing Safari.Again, your mileage may vary depending on your machine.Here's a test-case for it.Any improvements, suggestions, etc. are warmly welcomed.
2007-04-20T06:52:00+02:00
| 10 lectures
Rising back from the dead, the UI JavaScript library Rico just released a first beta of their upcoming version 2.0, which you can download from their website.It's based on the latest release of Prototype (version 1.5.1_rc2) which is included in the download.I am really, really happy to see this project alive again, as yet another example of the striving Prototype community.It's the best reward we could get for the work we've put into Prototype 1.5 and the documentation site.Thanks Richard for pursuing your great work and making it available to the community, and welcome to your new contributor: Matt Brown.
2007-04-24T10:16:00+02:00
| 5 lectures
We've just released Prototype 1.5.1_rc3, here's what's new since release candidate 2:Bug fixesElement.addMethods now also again adds the methods to Element. [#7888]Form.request also works with forms containing an input element with name="action". [#8063]Safari no longer crashes on String#stripScripts and extractScripts with large <script>.Form.disable works again on non-form elements. [#6887]String#endsWith now always returns the correct value. [#7822]Ajax responses with no Content-type header are no longer evaluated. [#7827]Hash#toQueryString again serializes undefined values to ensure consitency with String#toQueryParams. [#7806]Various fixes of the $$() utility. [#7873], [#7901...
2007-05-07T19:37:00+02:00
| 19 lectures
The web is a place full of surprises. And sometimes they aren't good ones. Most of you know jQuery, John Resig's excellent JavaScript library, well... the website it's hosted on has been the subject of DOS attack over the week-end, and its host kindly invited John to go look for hosting elsewhere.jQuery has now found a new host, (you might still encounter issues connecting to it while the DNS propagates), but the move was costly and Learning jQuery is still collecting funds to cover the move. Please consider chipping in a dime or two.
2007-05-12T02:54:00+02:00
| 8 lectures
Seen on project.ioni.st today: The feeling I get when programming is at least as important as other factors when selecting a language. Chad FowlerThat's what I refer to as the gut factor. And which is what made me stick with Prototype when no documentation was available, updates were scarce, and people were migrating en masse to jQuery and YUI.Looking back, that was one of the wisest decisions I made: I learnt way more about JavaScript helping out with the documentation and joining the Core Team than I would have otherwise.What about you. What factors pushed you to adopt the language, framework, or library that your are using today ?
2007-05-14T13:47:00+02:00
| 12 lectures
Christophe Proteneuve, one of my fellow Prototype Core Team, member, just published the first Beta Book of Prototype and script.aculo.us - You never knew JavaScript could do this! over at the Pragmatic Programmers. (You can read more about the whole beta book concept on their website).Affectionately dubbed "The Bungee Book" by Sam Stephenson-the master mind behind Prototype-Christophe's upcoming title is sure to become the reference for Prototype and Script.aculo.us developers across the world.I've had the chance to read through the first beta and all I can say is that you'd be just plain stupid not to grab a copy now: It's thorough, extremely well documented (no wonder, Christophe wrote ...
2007-05-17T04:13:00+02:00
| 153 lectures
Just a hilarious Escher/Oscar Reutersvärd (yet another swede!) inspired snapshot stolen from Christian Heilmann's slides for his Seven Reasons for Code Bloat presentation for the WSG London Meet-up.Couldn't resist. Hope he doesn't mind.
2007-05-22T16:21:00+02:00
| 34 lectures
Living on the edge and using Prototype's latest DOM Builder ? Feeling a bit dirty doing the following:new Element('div').update('some text...');// --> <div>some text...</div>Here's a quick solution (using Element.addMethods) to fully dwell in complete web-standardness:Element.addMethods({ appendText: function(element, text) { element = $(element); text = String.interpret(text); element.appendChild(document.createTextNode(text)); return element; }});Best part is that it lets you append anything, as long as the text argument has a toString method (thanks to Ash Searle for suggesting a better handling of null and undefined):new Element('div').appendText('Some more...
2007-06-04T00:30:00+02:00
| 9 lectures
2007-06-15T01:11:00+02:00
| 5 lectures
I get a kick out of reading uncov's passionate rants. The style is far from politically correct - hey, that's one of unconv's trademark after all - but some of the remarks made are very insightful.Anyway, I was just going through the website's recent redesign and bumped into the job board section.Well... looks like it's one thing to criticize, and another to choose decent tools. The UI for that job search is just bad!Thought it was funny to find something that poorly designed on uncov (and yes I know it's provided by a third party, but there are tons of better tools for the job)!
2007-06-17T19:03:00+02:00
| 5 lectures
Nearly got burnt by a surprising behavior of JavaScript. We probably all know by now that null, the integer 0, '' (the empty string) and undefined are evaluated as false inside an if statement. What's a bit more curious is the following behaviour (try it the firebug console):false == 0;// -> truefalse == '';// -> truefalse == undefined;// -> falsefalse == null;// -> falseIf anyone has a rationale explanation to this, please share.
2007-09-02T09:26:00+02:00
| 9 lectures
[...] Indeed, tests such as the Acid 2.0 Web Standards tests, demonstrates that the iPhone version of Safari supports more standards than Microsoft's desktop version of Internet Explorer. - Matthew David, Developing Web Applications for the iPhoneI'm not sure I consider the Acid Test as relevant enough in the above context, but that quote is just too hilarious to let pass. |