Add message
This commit is contained in:
parent
d92f72fc73
commit
a37579c06a
2
dist/ffnm.min.js
vendored
2
dist/ffnm.min.js
vendored
File diff suppressed because one or more lines are too long
@ -19,12 +19,19 @@ function validateSyntax() {
|
|||||||
// Check element FUNCTION_TREE
|
// Check element FUNCTION_TREE
|
||||||
return [...document.querySelectorAll(`[${event}]`)].map((element) => {
|
return [...document.querySelectorAll(`[${event}]`)].map((element) => {
|
||||||
// Check KEY FUNCTION_TREE
|
// Check KEY FUNCTION_TREE
|
||||||
return Object.keys(FUNCTION_TREE).map((key) => {
|
let checked = Object.keys(FUNCTION_TREE).map((key) => {
|
||||||
// Check METHODS FUNCTION_TREE
|
// Check METHODS FUNCTION_TREE
|
||||||
return FUNCTION_TREE[key].map((method) => {
|
return FUNCTION_TREE[key].map((method) => {
|
||||||
return RegExp(`^${key}:${method}\\('\\w+', *'[#,.,a-zA-Z]\\w*'\\)$`).test(element.getAttribute(event));
|
return RegExp(`^${key}:${method}\\('\\w+', *'[#,.,a-zA-Z]\\w*'\\)$`).test(element.getAttribute(event));
|
||||||
}).some(method => method);
|
}).some(method => method);
|
||||||
}).every(key => key);
|
}).every(key => key);
|
||||||
|
// Notify error
|
||||||
|
if(!checked) {
|
||||||
|
console.error('FFNM: Bad syntax');
|
||||||
|
console.error(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
return checked;
|
||||||
}).every(item => item);
|
}).every(item => item);
|
||||||
}).every(event => event);
|
}).every(event => event);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"lib": [
|
|
||||||
"es6",
|
|
||||||
"dom",
|
|
||||||
"dom.iterable"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user