visitEvent method
void
visitEvent(
- BoundEventAst ast, [
- _MissingDirectiveContext? context
])
override
Implementation
@override
void visitEvent(ng.BoundEventAst ast, [_MissingDirectiveContext? context]) {
var name = _extractEventName(ast.name);
if (!(_matchedSelectorWithAttribute(
context!.skipValidationSelectors, ast.name) ||
// HTML events are not case sensitive.
isNativeHtmlEvent(name.toLowerCase()) ||
_registry.hasEvent(context.elementName, name) ||
hasEventInAllowlist(context.elementName, ast.name))) {
CompileContext.current.reportAndRecover(
BuildError.forSourceSpan(
ast.sourceSpan,
"Can't bind to ($name) since it isn't an output "
'of any bound directive or a native event. Please check '
'that the spelling is correct, and that the intended '
"directive is included in the host component's list of "
'directives. See more details go/skipschemavalidationfor.\n'
'$optedOutValidator',
),
);
}
}