Promises

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Promises

Juan Manuel Vicente

Hi all,

Some days ago I implemented async calls with promises. So the calls change from this:

Older version, sync and blocking method:

// GetRecords
var results = csw.GetRecords(1,10,filter);
console.log(results);

to this:

New version, async and no-blocking method:

// GetRecords
csw.GetRecords(1,10,filter).then(function(result){
        console.log(result)
    });

The code can by re-viewed at https://github.com/juanmav/ows.js/tree/promises

any comments?

Regards
JM


_______________________________________________
owsjs mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/owsjs