You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making expectedType a string allows us to avoid having different cases for when it's a string vs when it's an element, reducing our checks and allowing us to simplify the outputted message.
Using identifier as our mandatory param allows us to avoid the hack of passing in null as the element to get the right error messages.
Who needs to work on this
Developer
Who needs to review this
Developer
Done when
A decision has been made on which changes to make
Changes have been implemented
All existing tests and throws have been refactored to work with the changes
The text was updated successfully, but these errors were encountered:
Little note to make sure we account for the Skip Link's error when there's no hash in the URL, which may need its own little case (see end of that comment on #4299).
What
Potential changes include:
ElementError.options.expectedType
is always a string, when present${identifier} is not of type ${expectedType || 'HTMLElement'}
identifier
the mandatory first param and moveelement
into options:constructor(identifier, {componentName, element, expectedType})
Why
Making
expectedType
a string allows us to avoid having different cases for when it's a string vs when it's an element, reducing our checks and allowing us to simplify the outputted message.Using
identifier
as our mandatory param allows us to avoid the hack of passing innull
as the element to get the right error messages.Who needs to work on this
Developer
Who needs to review this
Developer
Done when
The text was updated successfully, but these errors were encountered: