|
9 | 9 | import OrderedCollections
|
10 | 10 |
|
11 | 11 | /// The alias combines the global attributes of the basic attributes.
|
12 |
| -public typealias GlobalAttributes = AccessKeyAttribute & AutocapitalizeAttribute & AutofocusAttribute & ClassAttribute & EditAttribute & DirectionAttribute & DragAttribute & EnterKeyHintAttribute & HiddenAttribute & InputModeAttribute & IsAttribute & ItemIdAttribute & ItemPropertyAttribute & ItemReferenceAttribute & ItemScopeAttribute & ItemTypeAttribute & IdentifierAttribute & LanguageAttribute & NonceAttribute & RoleAttribute & SpellCheckAttribute & StyleAttribute & TabulatorAttribute & TitleAttribute & TranslateAttribute |
| 12 | +public typealias GlobalAttributes = AccessKeyAttribute & AutocapitalizeAttribute & AutofocusAttribute & ClassAttribute & EditAttribute & DirectionAttribute & DragAttribute & EnterKeyHintAttribute & HiddenAttribute & InputModeAttribute & IsAttribute & ItemIdAttribute & ItemPropertyAttribute & ItemReferenceAttribute & ItemScopeAttribute & ItemTypeAttribute & IdentifierAttribute & LanguageAttribute & NonceAttribute & RoleAttribute & SpellCheckAttribute & StyleAttribute & TabulatorAttribute & TitleAttribute & TranslateAttribute & InertAttribute & PopoverAttribute |
13 | 13 |
|
14 | 14 | /// The protocol provides the element with the accesskey handler.
|
15 | 15 | public protocol AccessKeyAttribute: Attribute {
|
@@ -2662,3 +2662,222 @@ extension ShadowRootModeAttribute where Self: ContentNode {
|
2662 | 2662 | return self.mutate(key: "shadowrootmode", value: value)
|
2663 | 2663 | }
|
2664 | 2664 | }
|
| 2665 | + |
| 2666 | +/// The protocol provides the element with inhert handler. |
| 2667 | +public protocol InertAttribute: Attribute { |
| 2668 | + |
| 2669 | + /// The function represents the html-attribute 'inert'. |
| 2670 | + /// |
| 2671 | + /// ```html |
| 2672 | + /// <tag inert /> |
| 2673 | + /// ``` |
| 2674 | + func inert() -> Self |
| 2675 | + |
| 2676 | + func inert(_ condition: Bool) -> Self |
| 2677 | +} |
| 2678 | + |
| 2679 | +extension InertAttribute where Self: ContentNode { |
| 2680 | + |
| 2681 | + internal func mutate(inert value: String) -> Self { |
| 2682 | + return self.mutate(key: "inert", value: value) |
| 2683 | + } |
| 2684 | +} |
| 2685 | + |
| 2686 | +extension InertAttribute where Self: EmptyNode { |
| 2687 | + |
| 2688 | + internal func mutate(inert value: String) -> Self { |
| 2689 | + return self.mutate(key: "inert", value: value) |
| 2690 | + } |
| 2691 | +} |
| 2692 | + |
| 2693 | +public protocol FetchPriorityAttribute: Attribute { |
| 2694 | + |
| 2695 | + /// The function represents the html-attribute 'shadowrootmode'. |
| 2696 | + /// |
| 2697 | + /// ```html |
| 2698 | + /// <tag fetchpriority="" /> |
| 2699 | + /// ``` |
| 2700 | + func fetchPriority(_ value: Values.Priority) -> Self |
| 2701 | +} |
| 2702 | + |
| 2703 | +extension FetchPriorityAttribute where Self: ContentNode { |
| 2704 | + |
| 2705 | + internal func mutate(fetchpriority value: String) -> Self { |
| 2706 | + return self.mutate(key: "fetchpriority", value: value) |
| 2707 | + } |
| 2708 | +} |
| 2709 | + |
| 2710 | +extension FetchPriorityAttribute where Self: EmptyNode { |
| 2711 | + |
| 2712 | + internal func mutate(fetchpriority value: String) -> Self { |
| 2713 | + return self.mutate(key: "fetchpriority", value: value) |
| 2714 | + } |
| 2715 | +} |
| 2716 | + |
| 2717 | +public protocol LoadingAttribute: Attribute { |
| 2718 | + |
| 2719 | + /// The function represents the html-attribute 'loading'. |
| 2720 | + /// |
| 2721 | + /// ```html |
| 2722 | + /// <tag loading="" /> |
| 2723 | + /// ``` |
| 2724 | + func loading(_ value: Values.Loading) -> Self |
| 2725 | +} |
| 2726 | + |
| 2727 | +extension LoadingAttribute where Self: ContentNode { |
| 2728 | + |
| 2729 | + internal func mutate(loading value: String) -> Self { |
| 2730 | + return self.mutate(key: "loading", value: value) |
| 2731 | + } |
| 2732 | +} |
| 2733 | + |
| 2734 | +extension LoadingAttribute where Self: EmptyNode { |
| 2735 | + |
| 2736 | + internal func mutate(loading value: String) -> Self { |
| 2737 | + return self.mutate(key: "loading", value: value) |
| 2738 | + } |
| 2739 | +} |
| 2740 | + |
| 2741 | +public protocol SourceSetAttribute: Attribute { |
| 2742 | + |
| 2743 | + /// The function represents the html-attribute 'loading'. |
| 2744 | + /// |
| 2745 | + /// ```html |
| 2746 | + /// <tag srcset="" /> |
| 2747 | + /// ``` |
| 2748 | + func sourceSet(_ value: String) -> Self |
| 2749 | +} |
| 2750 | + |
| 2751 | +extension SourceSetAttribute where Self: ContentNode { |
| 2752 | + |
| 2753 | + internal func mutate(sourceset value: String) -> Self { |
| 2754 | + return self.mutate(key: "srcset", value: value) |
| 2755 | + } |
| 2756 | +} |
| 2757 | + |
| 2758 | +extension SourceSetAttribute where Self: EmptyNode { |
| 2759 | + |
| 2760 | + internal func mutate(sourceset value: String) -> Self { |
| 2761 | + return self.mutate(key: "srcset", value: value) |
| 2762 | + } |
| 2763 | +} |
| 2764 | + |
| 2765 | +public protocol DecodingAttribute: Attribute { |
| 2766 | + |
| 2767 | + /// The function represents the html-attribute 'decoding'. |
| 2768 | + /// |
| 2769 | + /// ```html |
| 2770 | + /// <tag decoding="" /> |
| 2771 | + /// ``` |
| 2772 | + func decoding(_ value: Values.Decoding) -> Self |
| 2773 | +} |
| 2774 | + |
| 2775 | +extension DecodingAttribute where Self: ContentNode { |
| 2776 | + |
| 2777 | + internal func mutate(decoding value: String) -> Self { |
| 2778 | + return self.mutate(key: "decoding", value: value) |
| 2779 | + } |
| 2780 | +} |
| 2781 | + |
| 2782 | +extension DecodingAttribute where Self: EmptyNode { |
| 2783 | + |
| 2784 | + internal func mutate(decoding value: String) -> Self { |
| 2785 | + return self.mutate(key: "decoding", value: value) |
| 2786 | + } |
| 2787 | +} |
| 2788 | + |
| 2789 | +public protocol BlockingAttribute: Attribute { |
| 2790 | + |
| 2791 | + /// The function represents the html-attribute 'blocking'. |
| 2792 | + /// |
| 2793 | + /// ```html |
| 2794 | + /// <tag blocking="" /> |
| 2795 | + /// ``` |
| 2796 | + func blocking(_ value: Values.Blocking) -> Self |
| 2797 | +} |
| 2798 | + |
| 2799 | +extension BlockingAttribute where Self: ContentNode { |
| 2800 | + |
| 2801 | + internal func mutate(blocking value: String) -> Self { |
| 2802 | + return self.mutate(key: "blocking", value: value) |
| 2803 | + } |
| 2804 | +} |
| 2805 | + |
| 2806 | +extension BlockingAttribute where Self: EmptyNode { |
| 2807 | + |
| 2808 | + internal func mutate(blocking value: String) -> Self { |
| 2809 | + return self.mutate(key: "blocking", value: value) |
| 2810 | + } |
| 2811 | +} |
| 2812 | + |
| 2813 | +public protocol PopoverAttribute: Attribute { |
| 2814 | + |
| 2815 | + /// The function represents the html-attribute 'popover'. |
| 2816 | + /// |
| 2817 | + /// ```html |
| 2818 | + /// <tag popover="" /> |
| 2819 | + /// ``` |
| 2820 | + func popover(_ value: Values.Popover.State) -> Self |
| 2821 | +} |
| 2822 | + |
| 2823 | +extension PopoverAttribute where Self: ContentNode { |
| 2824 | + |
| 2825 | + internal func mutate(popover value: String) -> Self { |
| 2826 | + return self.mutate(key: "popover", value: value) |
| 2827 | + } |
| 2828 | +} |
| 2829 | + |
| 2830 | +extension PopoverAttribute where Self: EmptyNode { |
| 2831 | + |
| 2832 | + internal func mutate(popover value: String) -> Self { |
| 2833 | + return self.mutate(key: "popover", value: value) |
| 2834 | + } |
| 2835 | +} |
| 2836 | + |
| 2837 | +public protocol PopoverTargetAttribute: Attribute { |
| 2838 | + |
| 2839 | + /// The function represents the html-attribute 'popovertarget'. |
| 2840 | + /// |
| 2841 | + /// ```html |
| 2842 | + /// <tag popovertarget="" /> |
| 2843 | + /// ``` |
| 2844 | + func popoverTarget(_ value: String) -> Self |
| 2845 | +} |
| 2846 | + |
| 2847 | +extension PopoverAttribute where Self: ContentNode { |
| 2848 | + |
| 2849 | + internal func mutate(popovertarget value: String) -> Self { |
| 2850 | + return self.mutate(key: "popovertarget", value: value) |
| 2851 | + } |
| 2852 | +} |
| 2853 | + |
| 2854 | +extension PopoverAttribute where Self: EmptyNode { |
| 2855 | + |
| 2856 | + internal func mutate(popovertarget value: String) -> Self { |
| 2857 | + return self.mutate(key: "popovertarget", value: value) |
| 2858 | + } |
| 2859 | +} |
| 2860 | + |
| 2861 | +public protocol PopoverActionAttribute: Attribute { |
| 2862 | + |
| 2863 | + /// The function represents the html-attribute 'popovertargetaction'. |
| 2864 | + /// |
| 2865 | + /// ```html |
| 2866 | + /// <tag popovertargetaction="" /> |
| 2867 | + /// ``` |
| 2868 | + func popoverAction(_ value: Values.Popover.Action) -> Self |
| 2869 | +} |
| 2870 | + |
| 2871 | +extension PopoverAttribute where Self: ContentNode { |
| 2872 | + |
| 2873 | + internal func mutate(popoveraction value: String) -> Self { |
| 2874 | + return self.mutate(key: "popovertargetaction", value: value) |
| 2875 | + } |
| 2876 | +} |
| 2877 | + |
| 2878 | +extension PopoverAttribute where Self: EmptyNode { |
| 2879 | + |
| 2880 | + internal func mutate(popoveraction value: String) -> Self { |
| 2881 | + return self.mutate(key: "popovertargetaction", value: value) |
| 2882 | + } |
| 2883 | +} |
0 commit comments