ImageElement

init

Creates an ImageElement instance.

Return: The ImageElement instance.

alt

Sets the alt text for the ImageElement instance.

Return: The ImageElement instance.

getMemento

Converts the ImageElement instance to a serializable format.

Return: (struct) A struct representing this ImageElement instance.

{
    "type": "image",
    "image_url": "https://placekitten.com/200/300",
    "alt_text": "A cute kitten"
}

Last updated