hyTags
HomeHome DocumentationDocumentation

if-false

Executes commands if the value is false.
Parameter
Type
Description
value
Bool
The boolean value to check
return
Type?
The expected return type from the commands
commands
Commands
Commands to execute if the value is false
return
void
The return value from the executed commands, if any
Test Case:Executes commands when false
    <div></div>
    
    <bool-false>
    <if-false return="string">
      <string-new value="executed">
    </if-false>
    <assert-equal value="executed" type="string">
    
    👆 Try to change something!
  • Test Case:Does not execute commands when true
      <div></div>
      
      <var-set name="result" value="default"></var-set>
      <bool-true>
      <if-false>
        <var-set name="result" value="executed"></var-set>
      </if-false>
      <var-get name="result">
      <assert-equal value="default" type="string">
      
      👆 Try to change something!
    • Test succeeded Test failed