Skip to content

Pseudo-function argument validation inconsistencies causing null crashes or misleading errors #1766

Description

@RedZapdos123

Some pseudo-classes behave inconsistently when required arguments are missing.

Examples:

  • :lang throws Cannot read properties of null (reading 'split')
  • :icontains throws Cannot read properties of null (reading 'toLowerCase')
  • :nth-child throws Cannot read properties of null (reading 'match')
  • :has / :not without arguments can report Unknown pseudo-class instead of a clear arity error

Expected:

  • Invalid selectors should fail with consistent selector-validation errors (for example, "requires an argument"), not internal null/property errors or misleading unknown-pseudo errors.

This seems to come from uneven argument validation across pseudo execution paths.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions