ErrorEvent: lineno-Eigenschaft
Hinweis: Diese Funktion ist in Web Workers verfügbar.
Die schreibgeschützte Eigenschaft lineno
des ErrorEvent
-Interfaces gibt eine Ganzzahl zurück, die die Zeilennummer der Skriptdatei enthält, in der der Fehler aufgetreten ist.
Wert
Eine Ganzzahl.
Beispiele
js
window.addEventListener("error", (ev) => {
console.log("The error occur in line: " + ev.lineno);
});
Spezifikationen
Specification |
---|
HTML # dom-errorevent-lineno |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lineno |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.