Repository navigation
fix(document-injection): Update to use injected document - #18780
Conversation
cdd400c to
2cdd4da
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
Others can pitch in, but I'm not sure whether this is worth the extra churn that it introduces. All of the cases that are using the global |
|
The primary point of this PR is not to support SSR. In my team's project (and potentially others), we are dynamically injecting Angular Material components into iframes. Because of this, we need to be able to configure the CDK and Material to subscribe to the correct document/window. |
Update several classes in Material and the CDK to reference the injected document instead of accessing the global document and window variables. This fixes use-cases where the document is dynamically provided. This change follows the pattern used in several other places such as the Cdk OverlayContainer.
d2146f0 to
21a7c5c
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
jelbourn
left a comment
There was a problem hiding this comment.
Once you remove the new additions from the components' public APIs, you can run the command(s) from the api_golden_checks job to add the new API golds to the PR.
Utilize private functions for _getWindow() and _getDocument() instead of using public getters.
Update golden files to reflect API changes.
|
Golden API files have been updated now also. |
|
@crisbeto @andrewseguin @devversion Could you please review this change when possible? |
|
@timsawyer they're not required; once it has the merge-ready label, it goes into our merge queue, pending global presubmit |
|
Ok cool, thanks for the clarification! |
* fix(document-injection): Update to use injected document Update several classes in Material and the CDK to reference the injected document instead of accessing the global document and window variables. This fixes use-cases where the document is dynamically provided. This change follows the pattern used in several other places such as the Cdk OverlayContainer. * fix(document-injection): Update to use injected document Utilize private functions for _getWindow() and _getDocument() instead of using public getters. * fix(document-injection): Update to use injected document Update golden files to reflect API changes. (cherry picked from commit 204db56)
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Update several classes in Material and the CDK to reference
the injected document instead of accessing the global document
and window variables. This fixes use-cases where the document
is dynamically provided. This change follows the pattern used
in several other places such as the Cdk OverlayContainer.