[Koha-bugs] [Bug 35718] Remove ES6 warnings from JavaScript system preferences
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Jan 7 16:19:37 CET 2024
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718
David Nind <david at davidnind.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #160584|0 |1
is obsolete| |
--- Comment #2 from David Nind <david at davidnind.com> ---
Created attachment 160613
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160613&action=edit
Bug 35718: Remove ES6 warns from JS system preferences
To test:
1. Add some JS like this to any of the UserJS system preferences:
$(document).ready( function() {
let something = 1;
const another_thing = 2;
let an_arrow_function = (a, b) => a + b;
console.log( an_arrow_function(something, another_thing) );
});
2. Notice the icons and warnings to the left of the line numbers:
let is available in ES6
const is available in ES6
arrow_function_syntax is available in ES6
3. APPLY PATCH
4. Try steps 1 and 2 again, the warnings should be gone.
5. Check that the JavaScript still works, in my example it should console.log
3.
Signed-off-by: David Nind <david at davidnind.com>
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list