input.rawValue

This feature is a read-only property for <input> elements presently called "rawValue" (naming currently in discussion). input.rawValue returns the actual text inside of textual input elements, as opposed to the sanitized value returned in the value property. For example, if a user enters "1234ee" into an <input type=number>, the rawValue property would return "1234ee," as opposed to the value property which returns an empty string.

Currently, there is no way to retrieve the actual text a user has entered into certain types of input elements. Without the ability to do this, framework authors are forced to guess what text the user entered and avoid clearing it by assigning to the .value property. It doesn't work perfectly, and they have to chase down bugs by adding more and more logic on top of the element (more on this issue in the linked explainer).

Demo

Documentation

Status in Chromium

Blink>DOM


In development (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No public signals
  • No public signals
  • No public signals
  • No signals

Owner

Last updated on 2020-02-05