frdl.when
- Asynchronous PromiseAus der Kategorie: Resources
window.frdl.when
function(condition, _then, withMe, _or, delayed, initFn)
Checks a given scope for a specificcondition(by condition || function) repeatedly within a configurable interval and triggers athenableif the condition evaluates to true by calling a givencallbackfunction applying a given scope variable as argument. The returned Promise provides a ["magic function"].__call(name, args) to provide some kind of "overloading".
@returnsinstanceofPromise
Example
The following snippet triggers an alert and resolves to true if the name of the window changes (checks for the change every 1 microsecond and should trigger after 5 seconds).
var NumChecks = -1;
var oldWindowName = window.name;
var AlteredWindowName = frdl.when(function(wn){
});
Core
/**
*
*
*/
_.when=function(condition, _then, withMe, _or, delayed /* !isNaN || typeof function */, initFn /* typeof function || undefined */){
};
Erstellt vonWEBFAN(Monday 1st of August 2016 09:04:07 AM - vor929.8Tagen)
in der KategorieResourcesals statische Seite
Zuletzt geändert: Monday 1st of August 2016 10:01:30 AM vonWEBFAN
Der Beitrag wurde insgesamt614mal gelesen (durchschnittlich0.66mal am Tag)
Bewertung des Beitrages:- Noch keine Bewertung -von 10 Punkten(bei 0 Stimmen)
Jetzt kostenlos als Benutzer von "frdl" registrieren...!
Kommentar zu diesem Beitrag verfassen:
Bewertung des Beitrages:- Noch keine Bewertung -von 10 Punkten(bei 0 Stimmen)
Kommentare zu diesem Beitrag:
- keine Kommentare zu diesem Beitrag vorhanden -