Storefront - Enterprise uses the Custom Element specification to handle contracts and communication between Bold Penguin elements and your own.
If you are developing in Typescript, you can use Contracts to write better tests and track changes we make to our components.
Creating your own custom elements
- Review our documentation for the custom element you want to replace
- In the framework or tooling of your choice, create a custom element with the documented properties, attributes, and events to match the contract
disconnectedCallbackto reset and cleanup your custom elements when the component is reused
- Register your element with the custom element registry to notify the Storefront - Enterprise of the availability of your element
I'm seeing null or undefined error messages
Most commonly this is caused by the DOM creating temporary instances of
the nodes. In order to handle the component being rendered outside the Storefront - Enterprise tree
you may need to refactor your component to handle
values. If the problem is upstream of the component you created, please contact
us directly and we'll work on resolving the issue.
I'm seeing data corruption
The DOM treats your elements like any other tag. This means the DOM may move
your element around and reuse it. In order to handle this you may need to expand
how you are using
connectedCallback to reset to initial state or
disconnectedCallback to prevent leaks.
I'm having issues with my date picker
The Bold Penguin SDK prefers to receives dates as
ISOString. Not using
ISOString can occasionally cause issues. This is relevant if you are using the bp-sdk-date-input.