Removed comment since border case appeared in Edge.
This commit is contained in:
parent
9db5723746
commit
70031d3bfa
9
dist/iwmlib.js
vendored
9
dist/iwmlib.js
vendored
@ -429,9 +429,12 @@
|
|||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
'error',
|
'error',
|
||||||
event => {
|
event => {
|
||||||
// if (typeof(event.error) == 'undefined') {
|
if (typeof(event.error) == 'undefined') {
|
||||||
// console.info("Catched undefined error", event)
|
// This sometimes happens in Edge. Since we have no error
|
||||||
// }
|
// position, we cannot do much beside an info log.
|
||||||
|
console.info("Catched undefined error", event);
|
||||||
|
return
|
||||||
|
}
|
||||||
this.appendError(event.error, event.filename);
|
this.appendError(event.error, event.filename);
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
|
32
dist/iwmlib.pixi.js
vendored
32
dist/iwmlib.pixi.js
vendored
@ -1335,6 +1335,19 @@
|
|||||||
|
|
||||||
static toLine(event) {
|
static toLine(event) {
|
||||||
return `${event.type} #${event.target.id} ${event.clientX} ${event.clientY}`
|
return `${event.type} #${event.target.id} ${event.clientX} ${event.clientY}`
|
||||||
|
let result = event.type;
|
||||||
|
let selector = this.selector(event.target);
|
||||||
|
result += ' selector: ' + selector;
|
||||||
|
if (event.target != document.querySelector(selector)) console.log('Cannot resolve', selector);
|
||||||
|
let keys = ['layerX', 'layerY', 'pageX', 'pageY', 'clientX', 'clientY'];
|
||||||
|
for (let key of keys) {
|
||||||
|
try {
|
||||||
|
result += ' ' + key + ':' + event[key];
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Invalid key: ' + key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
static compareExtractedWithSimulated() {
|
static compareExtractedWithSimulated() {
|
||||||
@ -6174,6 +6187,25 @@
|
|||||||
result[id] = this.getPosition(event);
|
result[id] = this.getPosition(event);
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
// case 'TouchEvent':
|
||||||
|
// // Needs to be observed: Perhaps changedTouches are all we need. If so
|
||||||
|
// // we can remove the touchEventKey default parameter
|
||||||
|
// if (touchEventKey == 'all') {
|
||||||
|
// for(let t of event.targetTouches) {
|
||||||
|
// result[t.identifier.toString()] = this.getPosition(t)
|
||||||
|
// }
|
||||||
|
// for(let t of event.changedTouches) {
|
||||||
|
// result[t.identifier.toString()] = this.getPosition(t)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// for(let t of event.changedTouches) {
|
||||||
|
// result[t.identifier.toString()] = this.getPosition(t)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// break
|
||||||
|
default:
|
||||||
|
break
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
@ -117,9 +117,12 @@ export default class Errors {
|
|||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
'error',
|
'error',
|
||||||
event => {
|
event => {
|
||||||
// if (typeof(event.error) == 'undefined') {
|
if (typeof(event.error) == 'undefined') {
|
||||||
// console.info("Catched undefined error", event)
|
// This sometimes happens in Edge. Since we have no error
|
||||||
// }
|
// position, we cannot do much beside an info log.
|
||||||
|
console.info("Catched undefined error", event)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.appendError(event.error, event.filename)
|
this.appendError(event.error, event.filename)
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user