From 423743fddd4adb53efce9f7c899edb3154677d45 Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Tue, 20 Feb 2024 14:38:25 -0500 Subject: [PATCH] Update JSDoc for `StreamElement` The JSDoc comment for the `StreamElement` is incorrect, and omits several actions. This commit sorts the list, replaces `"container"` with `"target"` (to mirror the attribute name), and mentions the missing actions. --- src/elements/stream_element.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/elements/stream_element.js b/src/elements/stream_element.js index b9bcf35f0..77f447594 100644 --- a/src/elements/stream_element.js +++ b/src/elements/stream_element.js @@ -6,20 +6,22 @@ import { nextRepaint } from "../util" /** * Renders updates to the page from a stream of messages. * - * Using the `action` attribute, this can be configured one of four ways: + * Using the `action` attribute, this can be configured one of eight ways: * - * - `append` - appends the result to the container - * - `prepend` - prepends the result to the container - * - `replace` - replaces the contents of the container - * - `remove` - removes the container - * - `before` - inserts the result before the target * - `after` - inserts the result after the target + * - `append` - appends the result to the target + * - `before` - inserts the result before the target + * - `prepend` - prepends the result to the target + * - `refresh` - initiates a page refresh + * - `remove` - removes the target + * - `replace` - replaces the outer HTML of the target + * - `update` - replaces the inner HTML of the target * * @customElement turbo-stream * @example * * * */