Skip to main content
Module

x/pouch/deps.ts>property

Collection of Web Components
Latest
function property
import { property } from "https://deno.land/x/pouch@v0.0.8/deps.ts";

The decorator property takes an optional object as argument with four optional properties:

  1. Setting reflect to false would stop the element's attribute from synchronising.
  2. Stop rerendering on property change by setting render to false.
  3. Wait for property assignment before rendering with the option wait.
  4. Check with assert if the input has a truthy value. Otherwise throw error. It also adds an array containing the names of the attributes you want to observe with the native lifecycle callback attributeChangedCallback.

Parameters

optional
unnamed 0: Omit<PropertyAndOptions, "property"> = [UNSUPPORTED]

Returns

(protoOrDescriptor: HTMLElement, name: string) => void