Skip to content

awaitHumanText

cl4cnam edited this page Nov 18, 2023 · 1 revision

Syntax

awaitHumanText()

Parameters

  • None

Return value

  • The string written by user without the final "newline" character.

Side effect

  • Display an empty box
    • This new element has two CSS classes: entry and self
    • If lib.css is loaded, you get this default style: border-color: #e0b000; margin-right: 10px; margin-left: auto; border-style: solid; border-width: 2px; background-color: #ffff80; border-radius: 10px; padding: 20px; width: 45%;
  • Wait for a user to write a string (in the empty box) followed by an "newline" character. At this time, return the string without the final "newline" character and replace entry CSS class by display
    • If lib.css is loaded, you get this default style: border-color: #e0b000; background-color: #ffffc0; margin-right: 10px; margin-left: auto; border-style: solid; border-width: 1px; border-radius: 10px; padding: 15px; width: 45%;