Limited availability
The capture
property of the HTMLInputElement
interface reflects the <input>
element's capture
attribute. Only relevant to the <input>
of type file
, the property and attribute specify whether, a new file should be captured from a user-facing (user
) or outward facing (environment
) camera or microphone. The type of file is defined the accept
attribute. If the attribute is not explicitly set, the capture
property is an empty string.
A string; Generally either user
or environment
, or an empty string (""
).
const inputElement = document.querySelector("avatar");
console.log(inputElement.capture); // the current value of the capture attribute
inputElement.capture = "user"; // sets the capture value
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4