Skip to content

Entries: TypeMismatchError is deprecated #233

Open

Description

@jcayzac

The File and Directory Entries API text folded in by #222 passes a "TypeMismatchError" DOMException to the errorCallback when a path argument denotes the wrong entry type or is invalid. Five sites: FileSystemDirectoryEntry.getFile() (type mismatch, invalid path), FileSystemDirectoryEntry.getDirectory() (type mismatch, invalid path), and FileSystemFileEntry.file().

TypeMismatchError is a legacy error type that most specifications have replaced with TypeError. The question is whether this specification can make that switch compatibly.

WPT covers this error scenario:

Resolution path: check current wpt.fyi results for the automated tests across engines. If engines actually raise TypeError there (i.e. the TypeMismatchError assertions fail), updating the document to TypeError is safe. If engines still raise TypeMismatchError, the deprecated DOMException name must be kept — switching would change observable behavior of the shipped API.

Related:

Activity

  1. self-assigned this
    on Nov 20, 2026
  2. changed the title [-]TypeMismatchError vs TypeError in the Entries API error callbacks[/-] [+]Entries: TypeMismatchError is deprecated[/+] on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions