For reference:
https://github.com/mozilla/pdf.js/issues/15571#issuecomment-1278141781
for (const name of names) {
    element.addEventListener(name, obj[name].bind(obj));
  }
}
/**
 * Convert a number between 0 and 100 into an hex number between 0 and 255.
 * @param {number} opacity
 * @return {string}
 */
function opacityToHex(opacity) {
  return Math.round(Math.min(255, Math.max(1, 255 * opacity)))
    .toString(16)
    .padStart(2, "0");
}
/**
 * Class to create some unique ids for the different editors.
 */
class IdManager {