-
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
1 parent
dabec23
commit 774e0f8
Showing
1 changed file
with
5 additions
and
9 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,22 +1,18 @@ | ||
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */ | ||
|
||
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers */ | ||
import { showExample } from './../apiExamples/programmaticallyShow.js'; | ||
import { hideExample } from './../apiExamples/programmaticallyHide.js'; | ||
|
||
export function initExamples(initCount) { | ||
initCount = initCount || 0; | ||
|
||
export function initExamples(initialCount = 0) { | ||
try { | ||
// javascript example function calls to be added here upon creation to test examples | ||
showExample(); | ||
hideExample(); | ||
} catch (err) { | ||
if (initCount <= 20) { | ||
if (initialCount <= 20) { | ||
// setTimeout handles issue where content is sometimes loaded after the functions get called | ||
setTimeout(() => { | ||
initExamples(initCount + 1); | ||
initExamples(initialCount + 1); | ||
}, 100); | ||
} | ||
} | ||
} | ||
|
||
} |