HTMLInputElement: capture property - Web APIs | MDN

Value

A string; generally either user or environment, or an empty string ("").

Example

js

const inputElement = document.querySelector("avatar");
console.log(inputElement.capture); // the current value of the capture attribute
inputElement.capture = "user"; // sets the capture value

Specifications

Specification
HTML Media Capture
# dom-htmlinputelement-capture

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.