Skip to content

Input Changed Event Lifecycle #104

@schreiaj

Description

@schreiaj

Potentially out of scope as it is related to the navigator.modelContextTesting - When executeTool updates the UI normal hooks to pick up on changes to input values don't work. change and input events explicitly call out user interactions and MutationObservers won't pick up the change because element.value changes aren't DOM changes. This leaves no common way to watch for MCP driven changes resulting in potential UI desync which could hamper AI/Human hybrid workflows.

This was specifically when using the Declarative API. It may be possible in the imperative API to manually fire onChange or onInput handlers there's not a great way to hook that up in Declarative.

I'm not a browser internals expert - but the most naive approach would be flagging the changes by executeTool as user interaction which would hook into the usual event cycle. Another option could be to add an attribute data-tool-call-updated=[uuid] (or use an appropriate tooluse attribute) which would allow watching for DOM changes using a mutation observer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions