getSourceLocation method

Returns an object that contains the line, column, and file location of a style declaration in its original source.

Note These APIs can only be used with F12 developer tools and the Diagnostics Script Engine, and can't be called from JavaScript.


var retVal = DiagnosticsStyles.getSourceLocation(style);


  • style [in]
    Type: CSSStyleDeclaration

    The style declaration (typically format).


This method returns the beginning of the property block (immediately after the { for a CSS rule, or after the quote for an inline style). Styles created or modified by script return a source location of 0/0/null.

See also