mirror of
https://github.com/servo/servo.git
synced 2025-10-14 23:40:26 +01:00
18 lines
No EOL
600 B
Text
18 lines
No EOL
600 B
Text
// 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;
|
|
}; |