highlightElement method

Displays a highlighting box and rules for a given element, using CSS colors passed in string form for each of the box-model regions.

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

 

 

Syntax

DiagnosticsBrowser.highlightElement(element, marginColor, borderColor, paddingColor, contentColor);

Parameters

  • element [in]
    Type: Element

    The element to highlight.

  • marginColor [in]
    Type: DOMString

    The color to use for the margin.

  • borderColor [in]
    Type: DOMString

    The color to use for the border.

  • paddingColor [in]
    Type: DOMString

    The color to use for the padding.

  • contentColor [in]
    Type: DOMString

    The color to use for the content.

Return value

This method does not return a value.

Remarks

Passing in a new element will remove the old highlighting. Passing in null for the element will remove the highlighting entirely (the color strings are ignored in this case).

See also

DiagnosticsBrowser