/ LJCJSCodeDoc / LJCCommonLib / LJC / SelectorStyle


Parameters
selector - A CSS selector name.
propertyName - An object property name.

Returns

The computed style value.

Syntax

JavaScript
static SelectorStyle(selector, propertyName)

Gets the first matching selector ComputedStyle property.

Example

JavaScript
// Gets the first matching selector ComputedStyle property.
SelectorStyle()
{
  const selector = "div";
  const propertyName = "color";
  const result = LJC.SelectorStyle(selector, propertyName);

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

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