message: rewrite targetselector as class
diff: // Modified in tools.js from selenium-IDE
  -function TargetSelector(callback, cleanupCallback) {
  +class TargetSelector {
  + constructor(callback, cleanupCallback) {
  this.callback = callback;
  this.cleanupCallback = cleanupCallback;
  @@ -38,7 +39,7 @@ function TargetSelector(callback, cleanupCallback) {
  doc.addEventListener("click", this, true);
  }
  -TargetSelector.prototype.cleanup = function () {
  + cleanup() {
  try {
  if (this.div) {
  if (this.div.parentNode) {
  @@ -60,9 +61,9 @@ TargetSelector.prototype.cleanup = function () {
  if (this.cleanupCallback) {
  this.cleanupCallback();
  }
  -};
  + }
  -TargetSelector.prototype.handleEvent = function (evt) {
  + handleEvent(evt) {
  switch (evt.type) {
  case "mousemove":
  this.highlight(evt.target.ownerDocument, evt.clientX, evt.clientY);
  @@ -76,18 +77,18 @@ TargetSelector.prototype.handleEvent = function (evt) {
  this.cleanup();
  break;
  }
  -};
  + }
  -TargetSelector.prototype.highlight = function (doc, x, y) {
  + highlight(doc, x, y) {
  if (doc) {
  const e = doc.elementFromPoint(x, y);
  if (e && e != this.e) {
  this.highlightElement(e);
  }
  }
  -};
  + }
  -TargetSelector.prototype.highlightElement = function (element) {
  + highlightElement(element) {
  if (element && element != this.e) {
  this.e = element;
  } else {
  @@ -101,11 +102,12 @@ TargetSelector.prototype.highlightElement = function (element) {
  }
  this.r = r;
  const style = "pointer-events: none; position: absolute; background-color: rgb(78, 171, 230); opacity: 0.4; border: 1px solid #0e0e0e; z-index: 100;";
  - const pos = "top:" + (r.top + this.win.scrollY) + "px; left:" + (r.left + this.win.scrollX) + "px; width:" + r.width + "px; height:" + r.height + "px;";
  + const pos = `top:${r.top + this.win.scrollY}px; left:${r.left + this.win.scrollX}px; width:${r.width}px; height:${r.height}px;`;
  this.div.setAttribute("style", style + pos);
  } else if (or) {
  this.div.setAttribute("style", "display: none;");
  }
  -};
  + }
  +}
  export default TargetSelector;
  