blob: 8835c5fee9151163b7010fa656606261fe6411fc [file] [log] [blame]
// Content was manually copied April 1 2020
// Source: Accelerated Text Detection in Images (https://wicg.github.io/shape-detection-api/text.html)
// This is currently a sister informative spec of Shape Detection API,
// so it could not be merged into /interfaces/shape-detection-api.idl
[
Constructor,
Exposed=(Window,Worker),
SecureContext
] interface TextDetector {
Promise<sequence<DetectedText>> detect(ImageBitmapSource image);
};
dictionary DetectedText {
required DOMRectReadOnly boundingBox;
required DOMString rawValue;
required FrozenArray<Point2D> cornerPoints;
};