-
Notifications
You must be signed in to change notification settings - Fork 161
Migrate beacon to dom #564
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!!
Thanks! Hopefully got the hang of it, going to try and slowly slog away at #545. Not looking forward to the big ones... (ahem crypto..) |
Yeah I know, I appreciate the slog through tedium hehe and I'll be joining you soon I promise 😆 |
Haha can't scalafix us out of this one eh? 😛 |
* @param data | ||
* The data parameter is the ArrayBufferView, Blob, DOMString, or FormData data that is to be transmitted. | ||
*/ | ||
def sendBeacon(url: String, data: dom.BodyInit = null): Boolean = js.native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be much simpler and cleaner to directly integrate this method in Navigator
instead of using those implicit conversions. See for example d7933f9 where I did this for the Vibration API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I guess the reason they were separated before was to quarantine the experimental methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was it. But now it doesn't make sense anymore, and it just obscures the API.
Lol I'm literally considering it hahahaha |
Towards #545. Tried my hand at this but kind of tricky to do while maintaining source compatibility, let me know what you think, thanks!