def _trigger_for(widget_key, attributes): if (attributes or {}).get("type") == "submit": return "soumission" return "clic"