mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-17 21:16:34 +02:00
942306572a
Closes #615. This pushes the conversion of OPTION/OPTGROUP elements to Choice objects into the WrappedSelect class and unifies the code paths a little between groups-present and groups-not-present. Some work towards possibly fixing #615
6 lines
195 B
TypeScript
6 lines
195 B
TypeScript
export const isHTMLOption = (e: Element): e is HTMLOptionElement =>
|
|
e.tagName === 'OPTION';
|
|
|
|
export const isHTMLOptgroup = (e: Element): e is HTMLOptGroupElement =>
|
|
e.tagName === 'OPTGROUP';
|