Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. DeprecationReportBody
  4. columnNumber

DeprecationReportBody: columnNumber property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Note: This feature is available inWeb Workers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

ThecolumnNumber read-only property of theDeprecationReportBody interface returns the line in the source file in which the deprecated feature was used.

Note:This property is most useful alongsideDeprecationReportBody.sourceFile andDeprecationReportBody.lineNumber as it enables the location of the column in that file and line where the error occurred.

Value

An integer, ornull if the column is not known.

Examples

In this example we create a newReportingObserver to observe deprecation reports, then print the value ofcolumnNumber to the console.

js
let options = {  types: ["deprecation"],  buffered: true,};let observer = new ReportingObserver((reports, observer) => {  let firstReport = reports[0];  console.log(firstReport.type); // deprecation  console.log(firstReport.body.sourceFile); // the source file  console.log(firstReport.body.lineNumber); // the line in that file  console.log(firstReport.body.columnNumber); // the column in that file.}, options);

Specifications

Specification
Deprecation Reporting
# dom-deprecationreportbody-columnnumber

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp