-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(core): CHECKOUT-4909 Pass in attributes to stylesheet #11
Conversation
src/stylesheet-loader.ts
Outdated
@@ -4,12 +4,17 @@ import BrowserSupport from './browser-support'; | |||
|
|||
export interface LoadStylesheetOptions { | |||
prepend: boolean; | |||
attributes: StylesheetAttributes; |
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.
should this be marked as optional?
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 believe is mandatory, prepend won't serve any purpose if we don't provide actual attributes. Please see how script loader does it Script-loader#7
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 prepend is not related to the attributes itself, but rather, where it's loaded?
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 checked Script-loader#7 but I think it's probably a typescript bug. Should be marked as optional there too, as there is code that caters for the scenario when attributes
is missing.
@capsula4 I've addressed your comments ♻️ |
What?
Pass in attributes to stylesheet
Why?
To be able to pass in attributes such as
integrity
andcrossorigin
Testing / Proof
@bigcommerce/frontend @bigcommerce/checkout