| Commit-Queue | +1 |
@mas...@chromium.org - PTAL - this version is able to avoid the sync fetch entirely!
if (module_request.Options().GetSync()) {Kurt Catti-SchmidtWould it be possible to centralize all the change here? I don't follow why plumbing through ScriptFetchOptions are necessary.
can we peek at ModuleScriptFetchRequest and see if that's a CSS module that we are loading from blob/data url to trigger this?
Kurt Catti-SchmidtI added the `SetSync` and `GetSync` because it's possible to create an imperative CSS module today and use a blob URL or dataURI, and I only want to change the behavior for the new declarative version.
e.g. https://codepen.io/Kurt-Catti-Schmidt/pen/vELVLoE for Blob and https://codepen.io/Kurt-Catti-Schmidt/pen/KwVGVJX for dataURI.
An alternative is to add a declarative/imperative flag, and change behaviors here based on that, but I think sync terminology makes the intent clearer, and I don't intend to add more differences between the imperative and declarative versions. Or I can change the behavior of the existing imperative version, but that doesn't feel like a safe change to make. What do you think?
Kurt Catti-SchmidtAlso, what do you think of this earlier version that kept a map of Blob URL's and then used a FileReader instead? https://chromium-review.googlesource.com/c/chromium/src/+/7093679/2
The latest version avoids the sync fetch entirely and adds a way to add entries to the module map. I think this will be much more performant, as it avoids the fetch entirely. Let me know what you think.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |