| // Copyright 2021 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // https://github.com/WICG/handwriting-recognition/blob/main/explainer.md |
| |
| [ |
| SecureContext, |
| Exposed=Window, |
| RuntimeEnabled=HandwritingRecognition |
| ] interface HandwritingStroke { |
| constructor(); |
| void addPoint(HandwritingPoint point); |
| // Get a copy of the points added to the stroke. |
| // TODO(crbug.com/1166910): Clarify to users that they can't modify the |
| // points using getPoints. According to the comments by @glenrob and @qjw, |
| // this may mislead the user that they can modify the points by modifying the |
| // returned value. We need to figure out to make it more clear that they can't |
| // and either shouldn't modify the points througth the method. |
| sequence<HandwritingPoint> getPoints(); |
| void clear(); |
| }; |