-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(examples): update examples to use new JS standard
- Loading branch information
1 parent
032c8af
commit 992b574
Showing
8 changed files
with
29 additions
and
35 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
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,24 @@ | ||
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */ | ||
|
||
import { dynamicMenuExample } from '../apiExamples/dynamicMenu'; | ||
import { valueExample } from '../apiExamples/value'; | ||
import { focusExample } from '../apiExamples/focus'; | ||
|
||
export function initComboboxApiExamples(initCount) { | ||
export function initExamples(initCount) { | ||
initCount = initCount || 0; | ||
|
||
try { | ||
// javascript example function calls to be added here upon creation to test examples | ||
dynamicMenuExample(); | ||
valueExample(); | ||
focusExample(); | ||
} catch { | ||
} catch (err) { | ||
if (initCount <= 20) { | ||
// setTimeout handles issue where content is sometimes loaded after the functions get called | ||
setTimeout(() => { | ||
initComboboxApiExamples(initCount + 1); | ||
initExamples(initCount + 1); | ||
}, 100); | ||
} | ||
} | ||
} | ||
|
||
initComboboxApiExamples(); |
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
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,23 +1,21 @@ | ||
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */ | ||
|
||
import { persistentExample } from '../apiExamples/persistent'; | ||
import { swapValueExample } from '../apiExamples/swapValue'; | ||
|
||
export function initComboboxIndexExamples(initCount) { | ||
export function initExamples(initCount) { | ||
initCount = initCount || 0; | ||
|
||
try { | ||
// javascript example function calls to be added here upon creation to test examples | ||
persistentExample(); | ||
swapValueExample(); | ||
} catch { | ||
} catch (err) { | ||
if (initCount <= 20) { | ||
// setTimeout handles issue where content is sometimes loaded after the functions get called | ||
setTimeout(() => { | ||
console.warn('message from index.min.js - init attempt:', initCount + 1); | ||
initComboboxIndexExamples(initCount + 1); | ||
initExamples(initCount + 1); | ||
}, 100); | ||
} | ||
} | ||
} | ||
|
||
console.warn('message from index.min.js'); | ||
|
||
initComboboxIndexExamples(); |
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
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
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
This file was deleted.
Oops, something went wrong.