Closed Ace-Who closed 1 year ago
On Fri, Jan 06, 2023 at 01:22:42PM -0800, Ace-Who wrote:
Array.map(document.querySelectorAll('command'), command =>
${command.id}: ${command.getAttribute('oncommand')}
).join('\n')
it would have been great if you had mentioned that this is snippet from the vimfx wiki. because this looked like a general javascript question, and the vimfx bug tracker is not really the right place for that.
but since it's in our wiki, it is relevant. :)
a while ago, Array.map was deprecated and then removed, in favour of Array.prototype.map(). if that works, please fix it in the wiki, thanks!
It should be possible to just replace Array.map
with Array.from
.
@girst Got it, thank you!
It should be possible to just replace
Array.map
withArray.from
.
That works, thank you!
Firefox Nightly 110.0a1, Windows 10 1903 x64
Trying to learn custom commands. When I run the following code:
in the Browser Console, it reports: