File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -2284,6 +2284,7 @@ function preloadPropsFromPreloadOptions(
2284
2284
fetchPriority: options.fetchPriority,
2285
2285
imageSrcSet: options.imageSrcSet,
2286
2286
imageSizes: options.imageSizes,
2287
+ referrerPolicy: options.referrerPolicy,
2287
2288
};
2288
2289
}
2289
2290
Original file line number Diff line number Diff line change @@ -5564,6 +5564,7 @@ function preloadPropsFromPreloadOptions(
5564
5564
fetchPriority : options . fetchPriority ,
5565
5565
imageSrcSet : options . imageSrcSet ,
5566
5566
imageSizes : options . imageSizes ,
5567
+ referrerPolicy : options . referrerPolicy ,
5567
5568
} ;
5568
5569
}
5569
5570
Original file line number Diff line number Diff line change @@ -3585,6 +3585,13 @@ body {
3585
3585
imageSizes : 'makes no sense' ,
3586
3586
} ) ;
3587
3587
3588
+ ReactDOM . preload ( 'rp' , {
3589
+ as : 'image' ,
3590
+ imageSrcSet : 'rpsrcset' ,
3591
+ imageSizes : 'rpsizes' ,
3592
+ referrerPolicy : 'no-referrer' ,
3593
+ } ) ;
3594
+
3588
3595
if ( isClient ) {
3589
3596
// Will key off href in absense of imageSrcSet
3590
3597
ReactDOM . preload ( 'client' , { as : 'image' } ) ;
@@ -3634,6 +3641,13 @@ body {
3634
3641
imagesizes = "foosizes"
3635
3642
/>
3636
3643
< link rel = "preload" as = "somethingelse" href = "bar" />
3644
+ < link
3645
+ rel = "preload"
3646
+ as = "image"
3647
+ imagesrcset = "rpsrcset"
3648
+ imagesizes = "rpsizes"
3649
+ referrerpolicy = "no-referrer"
3650
+ />
3637
3651
</ head >
3638
3652
< body > hello</ body >
3639
3653
</ html > ,
@@ -3653,6 +3667,13 @@ body {
3653
3667
imagesizes = "foosizes"
3654
3668
/>
3655
3669
< link rel = "preload" as = "somethingelse" href = "bar" />
3670
+ < link
3671
+ rel = "preload"
3672
+ as = "image"
3673
+ imagesrcset = "rpsrcset"
3674
+ imagesizes = "rpsizes"
3675
+ referrerpolicy = "no-referrer"
3676
+ />
3656
3677
</ head >
3657
3678
< body > hello</ body >
3658
3679
</ html > ,
@@ -3672,6 +3693,13 @@ body {
3672
3693
imagesizes = "foosizes"
3673
3694
/>
3674
3695
< link rel = "preload" as = "somethingelse" href = "bar" />
3696
+ < link
3697
+ rel = "preload"
3698
+ as = "image"
3699
+ imagesrcset = "rpsrcset"
3700
+ imagesizes = "rpsizes"
3701
+ referrerpolicy = "no-referrer"
3702
+ />
3675
3703
< link rel = "preload" as = "image" href = "client" />
3676
3704
< link rel = "preload" as = "image" imagesrcset = "clientset" />
3677
3705
< link
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export type PreloadOptions = {
18
18
fetchPriority ?: 'high' | 'low' | 'auto' ,
19
19
imageSrcSet ?: string ,
20
20
imageSizes ?: string ,
21
+ referrerPolicy ?: string ,
21
22
} ;
22
23
export type PreinitOptions = {
23
24
as : string ,
You can’t perform that action at this time.
0 commit comments