/ LJCJSCodeDoc / LJCCommonLib / LJC / ElementStyle


Parameters
element - An HTMLElement object.
propertyName - An object property name.

Returns

The computed style value.

Syntax

JavaScript
static ElementStyle(element, propertyName)

Gets the element ComputedStyle property.

Example

JavaScript
// Gets the element ComputedStyle property.
ElementStyle()
{
  const element = testDiv;
  const propertyName = "color";
  const result = LJC.ElementStyle(element, propertyName);

  // result:
  // rgb(0, 0, 0)
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.