Skip to content

Fix Phone Input error in Internet Explorer#5515

Merged
aduth merged 1 commit intomainfrom
aduth-phone-input-ie11-selected
Oct 18, 2021
Merged

Fix Phone Input error in Internet Explorer#5515
aduth merged 1 commit intomainfrom
aduth-phone-input-ie11-selected

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Oct 18, 2021

Why: HTMLSelectElement#selectedOptions is not supported in Internet Explorer.

See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions#browser_compatibility

NewRelic: https://onenr.io/0xZw0LMvpwv

@aduth
Copy link
Contributor Author

aduth commented Oct 18, 2021

As far as testing this for continuous integration, it'd be nice if there could be some way to hook into TypeScript's awareness of the DOM APIs to flag unsupported properties like this. Alternatively, in the past we've done similar with things like Event vs. CustomEvent, but it's very ad-hoc, and not very scalable for as much of the unsupported properties we'd have to consider. It's also worth weighing just how much longer we'd need to support IE11 at all 🤷

@zachmargolis
Copy link
Contributor

As far as testing this for continuous integration, it'd be nice if there could be some way to hook into TypeScript's awareness of the DOM APIs to flag unsupported properties like this

the irony that TypeScript is a Microsoft project 😭

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aduth aduth merged commit aaf8b36 into main Oct 18, 2021
@aduth aduth deleted the aduth-phone-input-ie11-selected branch October 18, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants