Skip to content

Support for placing within shadow root #38

@BrunnerLivio

Description

@BrunnerLivio

Given the following sample:

secureFields.initTokenize(
'1000001115',
{
iban: {
placeholderElementId: "iban",
placeholder: "IBAN placeholder",
ariaLabel: "IBAN aria label"
}
},
{
// options...
}
);

It is not possible to pass the placeholderElementId that is within a shadow root.
Is it somehow possible to pass a reference to the element? That way it would offer support for placing the element within a shadow root container?

e.g.

const host = document.querySelector("#host");
const shadow = host.attachShadow({ mode: "open" });
const iban = document.createElement("div");
iban.classList.add("secure-field--input");
shadow.appendChild(iban);
secureFields.initTokenize(
      '1000001115',
      {
        iban: {
         // here we pass the reference to the element rather than a string for the id
          placeholderElementId: iban,
          placeholder: "IBAN placeholder",
          ariaLabel: "IBAN aria label"
        }
      },
      {
        // options...
      }
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions