Function getReactAttrs

  • Translates the attributes of a DOM element into attributes that can be understood by React. Currently not comprehensive, we will add special cases as they become relevant.

    Parameters

    • elem: Element

      A DOM element

    • Optional ignore: {
          ignore?: string[];
      }

      An optional list of attribute names to ignore

      • Optional ignore?: string[]

    Returns {
        [key: string]: string | null;
    }

    An object with key:value pairs that are the React-friendly translation of elem's attributes

    • [key: string]: string | null

Generated using TypeDoc