Interface
InlineUtilInterface
Magento\Csp\Api\InlineUtilInterface
What it does
This interface provides utility methods for safely rendering HTML tags and event listeners while automatically whitelisting them in Content Security Policy (CSP).
Developers use this when they need to add inline scripts, styles, or event handlers in templates/layouts that would otherwise be blocked by CSP restrictions, ensuring the content is marked as trusted without using user-provided data.
Public Methods
- renderTag()
- renderEventListener()