I have in jQuery:
$(document).ready(function() {
$(document).on('click', "[id$='someId']", function () {
console.log($(this).val());
})
})
How can I write it in pure JavaScript?
$(document).ready(function()
Should I use "ready" in pure JavaScript?
$(document).on
How can I use "on"? I have to add dynamic elements, so in jQuery I must use "on".
I would like write this in accordance with ES6.
EventTarget.addEventListener().$(document).ready(function()" quite clearly asks what the linked question's answers answer. That's the problem with unfocussed questions. In any case, theonthing is trivially easy to find -- here on SO, and elsewhere, with the barest minimum of research. Please search and web search in future.