validations

package
v0.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package validations provides shared validation utilities and data for HTML attributes, custom elements, and other validation concerns across LSP and MCP components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalAttributeCount

func GetGlobalAttributeCount() int

GetGlobalAttributeCount returns the number of loaded global attributes.

func GetGlobalAttributes

func GetGlobalAttributes() map[string]bool

GetGlobalAttributes returns a copy of all loaded global attributes. This is useful for debugging or when you need the full list.

func IsGlobalAttribute

func IsGlobalAttribute(name string) bool

IsGlobalAttribute checks if an attribute name is a global HTML attribute. This includes: - All standard global HTML attributes from MDN data (id, class, slot, style, etc.) - data-* attributes (always valid) - aria-* attributes (always valid) - Event handler attributes starting with "on" (always valid)

Types

type MDNCompatData

type MDNCompatData struct {
	HTML struct {
		GlobalAttributes map[string]interface{} `json:"global_attributes"`
	} `json:"html"`
}

MDNCompatData represents the structure of MDN browser compatibility data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL