-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title>Example</title> | ||
<script type="text/javascript" src="../src/Flow.js"></script> | ||
</head> | ||
<body> | ||
<h1>Results in the console</h1> | ||
<script type="text/javascript"> | ||
var processExemple = new Flow( | ||
function (a, b, c) { | ||
// If you want to using the once function, you have to give a name for the function | ||
// like once and onceInAll | ||
|
||
this.onceInAll('t11', function () { | ||
console.log('ALL 1-1'); // Just run once even you back to this step | ||
}); | ||
console.log(1); | ||
this.once('t12', function () { | ||
console.log('Step 1-2 param:' + a + b + c); // Run once every time go to this step | ||
}); | ||
} | ||
, function (e, f, g) { | ||
console.log(2); | ||
this.once('t22', function () { | ||
console.log('Step 2-1 param:' + e + f + g); | ||
}); | ||
} | ||
, new Flow(function () { | ||
console.log("Sub flow 3.1"); | ||
}, function () { | ||
console.log("Sub flow 3.2"); | ||
}, new Flow() | ||
) | ||
, function () { | ||
console.log(4); | ||
} | ||
, function () { | ||
console.log(5); | ||
}).go(1, 2, 3).go(4, 5, 6).go().go().go().go().go() | ||
.go().go().go().go().go().go().go() | ||
.back().back().back().back(4, 5, 6).action().back(1, 2, 3).action(); | ||
// Here you can pass the args with go(),back(),action() for functions | ||
</script> | ||
</body> | ||
</html> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title>Example</title> | ||
<script type="text/javascript" src="../src/Flow.js"></script> | ||
</head> | ||
<body> | ||
<h1>Results in the console</h1> | ||
<script type="text/javascript"> | ||
var processExemple = new Flow( | ||
function (a, b, c) { | ||
// If you want to using the once function, you have to give a name for the function | ||
// like once and onceInAll | ||
|
||
this.onceInAll('t11', function () { | ||
console.log('ALL 1-1'); // Just run once even you back to this step | ||
}); | ||
console.log(1); | ||
this.once('t12', function () { | ||
console.log('Step 1-2 param:' + a + b + c); // Run once every time go to this step | ||
}); | ||
} | ||
, function (e, f, g) { | ||
console.log(2); | ||
this.once('t22', function () { | ||
console.log('Step 2-1 param:' + e + f + g); | ||
}); | ||
} | ||
, new Flow(function () { | ||
console.log("Sub flow 3.1"); | ||
}, function () { | ||
console.log("Sub flow 3.2"); | ||
}, new Flow() | ||
) | ||
, function () { | ||
console.log(4); | ||
} | ||
, function () { | ||
console.log(5); | ||
}).go(1, 2, 3).go(4, 5, 6).go().go().go().go().go() | ||
.go().go().go().go().go().go().go() | ||
.back().back().back().back(4, 5, 6).action().back(1, 2, 3).action(); | ||
// Here you can pass the args with go(),back(),action() for functions | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters