Source code for duck.html.components.core.warnings

"""
Warnings for HTML components.
"""

[docs] class DeeplyNestedEventBindingWarning(UserWarning): """ Warning indicating that a component has event bindings and is deeply nested in the DOM or component tree. This warning is triggered when a component with event listeners is placed at a deep nesting level (e.g., level 6 or greater). Deeply nested event bindings may result in slower updates or degraded performance due to increased layout, paint, or event propagation costs. Consider refactoring to reduce nesting or optimize event handling. Args: message (str): The warning message to display. """ pass
[docs] class RedundantUpdateWarning(UserWarning): """ Flagged when redundant update targets conflict due to shared parent; this may result in inefficiencies rather than updating the parent in one goal instead. """ pass