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
src/preact: use URL instead of parseUrlDeprecated #37561
Conversation
Out of curiosity, how do you generate your bundle size diff? |
src/preact/component/3p-frame.js
Outdated
@@ -105,7 +104,7 @@ function ProxyIframeEmbedWithRef( | |||
}; | |||
setNameAndSrc({ | |||
name: JSON.stringify({ | |||
'host': parseUrlDeprecated(src).hostname, | |||
'host': new URL(src, win.location).hostname, |
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.
Techincally, but does TS not yell at you? The second arg needs to be a string, but location
gets coerced to a string so it works in regular JS.
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.
preact/component/*.js
isnt' being typechecked yet. that will happen once this lands: #37463
Will preemptively call .toString()
here.
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.
I think you're looking for .href
… 😝
summary
We should not use the deprecated path in new code.
This breaks IE11 compat.
bundle size diff
notifications
@ampproject/wg-bento