21 May 2012

The Tech Reflector

 
Star Following

  Source Favicon
By Nicholas C. Zakas of NCZOnline 8 months ago.
Email

The setImmediate() function returns an ID that can be used to cancel the call via clearImmediate() if necessary.

It's also possible to pass arguments into the setImmediate() function argument by including them at the end: setImmediate(function(doc, win){

//do something

}, document, window);

Passing additional arguments in this way means that you needn't always use a closure with setImmediate() in order to have useful information available to the executing function.

Advantages …

nczonline.net Read
  Source Favicon
Email

…trying to fix this problem with BrowserID. It will let you login to websites with one ID - in ways that preserve your privacy.

Stormy can be found on Twitter as @ storming

Tristan Nitot

The new release of Firefox has brought us ScratchPad, a very cool new tool for Web devs, a bit like the Web Console on steroids. Kevin Dangoor has a great post on this: Introducing ScratchPad . Web devs who want to know what is coming in this department with future …

hacks.mozilla.org Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

The Unique ID ... StaticJSONP can be easily integrated together with normal JSONP service.

As example, if we need to obtain the list of best sellers, assuming this list is not static due too frequent changes, we can do something like this:

// this code is an example purpose only

// it won't work anywhere

// JSONP callback to best sellers

JSONP("http://amazon/restful/books/bestSellers", function (evt) {

// the evt contains a data property

var data = evt.data; …

webreflection.blogspot.com Read
  Source Favicon
On DailyJS 9 months ago.
Email

…execute functions based on the current "page". The current page is determined based on a body ID:

// Given <body id="page-home"> fayer . on ( 'page-home' , function () { // code for homepage goes here })

This doesn't require jQuery and is a very lightweight library. Fayer would come in handy when working on a project with monolithic client-side JavaScript, although I find myself using libraries like LABjs these days.

STD Rest

dailyjs.com Read
  Source Favicon
By Mr Speaker of O! Mr Speaker! 11 months ago.
Email

…wanted to extract piece of information from each of the RTSP URL (which contained an ID and a format code). I only wanted the IDs under 10000. Here's a bit that pulls out the IDs and sorts them: FEEDS=$( curl --location http://path.to/playlist.m3u | grep rtsp:// | awk 'BEGIN { FS="[=&]+" } ; $ 4

It works, but it's brittle: if something falls down in the middle of the chain, I won't know why. And Worse still, if my requirements change and I want a different …

mrspeaker.net Read
  Source Favicon
By John Resig of Official jQuery Blog 1 year ago.
Email

…6562 : using .attr() to set the ‘target' attribute, with a node that has ID of ‘target'

# 6708 : Opera has inconsistent result for usemap attribute value

# 6823 : Make .val(value) faster for common use case

# 7472 : $(‘form').attr(‘id') return DOM Element

# 7485 : Inconsistency between has [attribute] selector and attr() method

# 7709 : Permission denied to access property ‘nodeType' from …

blog.jquery.com Read