@@ -487,65 +487,70 @@ module Experimental: {
487
487
type preloadOptions ;
488
488
489
489
[@ mel . obj ]
490
- external preloadOptions : (
490
+ external preloadOptions :
491
491
/* Its possible values are audio, document, embed, fetch, font, image, object, script, style, track, video, worker. */
492
- ~_as : [
493
- | ` audio
494
- | ` document
495
- | ` embed
496
- | ` fetch
497
- | ` font
498
- | ` image
499
- | [@ mel . as "object" ] ` object_
500
- | ` script
501
- | ` style
502
- | ` track
503
- | ` video
504
- | ` worker
505
- ] ,
506
- /*
507
- Suggests a relative priority for fetching the resource.
508
- The possible values are auto (the default), high, and low.
509
- */
510
- ~fetchPriority : [ ` auto | ` high | ` low ] =?,
511
- /*
512
- The Referrer header to send when fetching.
513
- Its possible values are no-referrer-when-downgrade (the default), no-referrer, origin, origin-when-cross-origin, and unsafe-url.
514
- */
515
- ~referrerPolicy : [
516
- | [@ mel . as "no-referrer" ] ` noReferrer
517
- | [@ mel . as "no-referrer-when-downgrade" ] ` noReferrerWhenDowngrade
518
- | [@ mel . as "origin" ] ` origin
519
- | [@ mel . as "origin-when-cross-origin" ] ` originWhenCrossOrigin
520
- | [@ mel . as "unsafe-url" ] ` unsafeUrl
521
- ] =?,
522
- /*
523
- For use only with as: "image". Specifies the source set of the image.
524
- https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
525
- */
526
- ~imageSrcSet : string =?,
527
- /*
528
- For use only with as: "image". Specifies the source sizes of the image.
529
- https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
530
- */
531
- ~imageSizes : string =?,
532
- /*
533
- a required string. It must be "anonymous", "use-credentials", and "".
534
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
535
- */
536
- ~crossOrigin : string =?,
537
- /*
538
- A cryptographic hash of the module, to verify its authenticity.
539
- https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
540
- */
541
- ~integrity : string =?,
542
- /*
543
- A cryptographic nonce to allow the module when using a strict Content Security Policy.
544
- https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
545
- */
546
- ~nonce : string =?,
547
- unit
548
- ) => preloadOptions ;
492
+ (
493
+ ~_as : [
494
+ | ` audio
495
+ | ` document
496
+ | ` embed
497
+ | ` fetch
498
+ | ` font
499
+ | ` image
500
+ | [@ mel . as "object" ] ` object_
501
+ | ` script
502
+ | ` style
503
+ | ` track
504
+ | ` video
505
+ | ` worker
506
+ ] ,
507
+ /*
508
+ Suggests a relative priority for fetching the resource.
509
+ The possible values are auto (the default), high, and low.
510
+ */
511
+ ~fetchPriority : [ | ` auto | ` high | ` low ] =?,
512
+ /*
513
+ The Referrer header to send when fetching.
514
+ Its possible values are no-referrer-when-downgrade (the default), no-referrer, origin, origin-when-cross-origin, and unsafe-url.
515
+ */
516
+ ~referrerPolicy : [
517
+ | [@ mel . as "no-referrer" ] ` noReferrer
518
+ | [@ mel . as "no-referrer-when-downgrade" ]
519
+ ` noReferrerWhenDowngrade
520
+ | [@ mel . as "origin" ] ` origin
521
+ | [@ mel . as "origin-when-cross-origin" ]
522
+ ` originWhenCrossOrigin
523
+ | [@ mel . as "unsafe-url" ] ` unsafeUrl
524
+ ]
525
+ =?,
526
+ /*
527
+ For use only with as: "image". Specifies the source set of the image.
528
+ https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
529
+ */
530
+ ~imageSrcSet : string =?,
531
+ /*
532
+ For use only with as: "image". Specifies the source sizes of the image.
533
+ https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
534
+ */
535
+ ~imageSizes : string =?,
536
+ /*
537
+ a required string. It must be "anonymous", "use-credentials", and "".
538
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
539
+ */
540
+ ~crossOrigin : string =?,
541
+ /*
542
+ A cryptographic hash of the module, to verify its authenticity.
543
+ https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
544
+ */
545
+ ~integrity : string =?,
546
+ /*
547
+ A cryptographic nonce to allow the module when using a strict Content Security Policy.
548
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
549
+ */
550
+ ~nonce : string =?,
551
+ unit
552
+ ) =>
553
+ preloadOptions ;
549
554
550
555
/*
551
556
preinit options.
@@ -555,20 +560,20 @@ module Experimental: {
555
560
type preinitOptions = {
556
561
/* possible values: "script" or "style" */
557
562
[@mel.as "as"]
558
- _as: [ | ` script | ` style ] ,
563
+ _as: [ | ` script | ` style ] ,
559
564
/*
560
565
Suggests a relative priority for fetching the resource.
561
566
The possible values are auto (the default), high, and low.
562
567
*/
563
568
[@mel.optional]
564
- fetchPriority: option ([ ` auto | ` high | ` low ] ),
569
+ fetchPriority: option ([ | ` auto | ` high | ` low ] ),
565
570
/*
566
571
Required with Stylesheets (`style). Says where to insert the stylesheet relative to others.
567
572
Stylesheets with higher precedence can override those with lower precedence.
568
573
The possible values are reset, low, medium, high.
569
574
*/
570
575
[@mel.optional]
571
- precedence: option ([ ` reset | ` low | ` medium | ` high ] ),
576
+ precedence: option ([ | ` reset | ` low | ` medium | ` high ] ),
572
577
/*
573
578
a required string. It must be "anonymous", "use-credentials", and "".
574
579
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
@@ -598,7 +603,7 @@ module Experimental: {
598
603
type preOptions = {
599
604
/* It must be 'script'. */
600
605
[@mel.as "as"]
601
- _as: [ | ` script ] ,
606
+ _as: [ | ` script ] ,
602
607
/*
603
608
a required string. It must be "anonymous", "use-credentials", and "".
604
609
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
@@ -619,19 +624,22 @@ module Experimental: {
619
624
nonce: option (string ),
620
625
};
621
626
622
- [@ mel . module "react-dom" ]
623
- external preconnect : string => unit = "preconnect" ;
627
+ [@ mel . module "react-dom" ] external preconnect : string => unit = "preconnect" ;
624
628
[@ mel . module "react-dom" ]
625
629
external prefetchDNS : string => unit = "prefetchDNS" ;
626
630
[@ mel . module "react-dom" ]
627
- external preinit : (string , ~options : preinitOptions =?, unit ) => unit = "preinit" ;
631
+ external preinit : (string , ~options : preinitOptions =?, unit ) => unit =
632
+ "preinit" ;
628
633
[@ mel . module "react-dom" ]
629
- external preinitModule : (string , ~options : preOptions =?, unit ) => unit = "preinitModule" ;
634
+ external preinitModule : (string , ~options : preOptions =?, unit ) => unit =
635
+ "preinitModule" ;
630
636
[@ mel . module "react-dom" ]
631
- external preload : (string , ~options : preloadOptions =?, unit ) => unit = "preload" ;
637
+ external preload : (string , ~options : preloadOptions =?, unit ) => unit =
638
+ "preload" ;
632
639
[@ mel . module "react-dom" ]
633
- external preloadModule : (string , ~options : preOptions =?, unit ) => unit = "preloadModule" ;
634
- }
640
+ external preloadModule : (string , ~options : preOptions =?, unit ) => unit =
641
+ "preloadModule" ;
642
+ };
635
643
636
644
external domElementToObj : Dom . element => Js . t ({..}) = "% identity " ;
637
645
0 commit comments