Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output an error for Element.replaceChildren() with Safari 13 #526

Open
jckautzmann opened this issue Jan 26, 2023 · 2 comments
Open

Output an error for Element.replaceChildren() with Safari 13 #526

jckautzmann opened this issue Jan 26, 2023 · 2 comments

Comments

@jckautzmann
Copy link

According to the MDN reference docs [0] Element.replaceChildren() is supported with Safari >= 14.
When run with Safari 13, the eslint compat plugin should output an error like:

Element.replaceChildren() is not supported in Safari 13

whereas it doesn't output an error message.

[0] https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceChildren

@esetnik
Copy link

esetnik commented Feb 6, 2023

I am noticing the same issue with HTMLFormElement.requestSubmit() in safari 15.

https://caniuse.com/mdn-api_htmlformelement_requestsubmit

@samz-paypay
Copy link

I guess it's beyond the ability of eslint? My impression is that eslint only does grammar analysis (builds AST).
For code like:

const a = document.getElementById('id')
a.replaceChildren()

eslint doesn't know a is Element?

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

No branches or pull requests

3 participants