Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Guidelines
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Redmine
Redmine
Labels
Merge Requests
1
Merge Requests
1
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
External
Guidelines
Commits
0ee6de96
Commit
0ee6de96
authored
Jan 29, 2018
by
Petr Hošek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
229940 - schedule difference
parent
1c69a5f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
JS/README.md
JS/README.md
+4
-1
No files found.
JS/README.md
View file @
0ee6de96
...
...
@@ -126,21 +126,24 @@ end
`EASY.schedule.main`
and
`EASY.schedule.late`
accepts priority as a second parameter. Lower the priority, later will be function executed.
`EASY.schedule.require`
accepts function as a second parameter, which has to be fulfilled before the execution of the init function.
```
javascript
/** EASY.schedule.late - For functions, which should be executed after several loops after "DOMContentLoaded" event */
EASY
.
schedule
.
late
(
function
()
{
// executed after EASY.sidebar.init();
EASY
.
sidebar
.
loadData
();
},
-
5
);
/** EASY.schedule.main - for functions, which should be executed right after "DOMContentLoaded" event. */
EASY
.
schedule
.
main
(
function
()
{
EASY
.
sidebar
.
init
();
});
```
```
javascript
/** EASY.schedule.require
usage
*/
/** EASY.schedule.require
- For functions, which should wait for [prerequisite] fulfillment
*/
EASY
.
schedule
.
require
(
function
(
sidebar
)
{
sidebar
.
init
();
},
function
()
{
return
window
.
EASY
.
sidebar
;
});
/** Advanced usage */
EASY
.
schedule
.
require
(
function
(
counter
,
$
)
{
$
(
"
body
"
).
on
(
"
click
"
,
counter
);
},
'
Counter
'
,
'
jQuery
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment