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

iOS 13.7 Support #795

Closed
danieldocki opened this issue Nov 11, 2022 · 3 comments
Closed

iOS 13.7 Support #795

danieldocki opened this issue Nov 11, 2022 · 3 comments

Comments

@danieldocki
Copy link

I have an error in iOS 13.7, in a POST request, using turbo_stream.update

TypeError: e.replaceChildren is not a function. (In 'e.replaceChildren(this.templateContent)', 'e.replaceChildren' is undefined)

there seems to be something on this line the error

this.targetElements.forEach((e) => e.replaceChildren(this.templateContent))

@marcoroth
Copy link
Member

Hey @danieldocki 👋🏼. Thanks for opening this issue!

replaceChildren() is just supported from iOS 14.0 and up, see here: https://caniuse.com/mdn-api_element_replacechildren

But you should be able to polyfill the function with something like this: zloirock/core-js#940 (comment)

@marcoroth
Copy link
Member

Also, for context: #534

@MaxHatfull
Copy link

I've put together a PR that restores this version of safari.

@dhh dhh closed this as completed Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants