DidacticialsInstructionsLinksAbout Zenith |
ifexists / ifnotexistsDescriptionExecutes sub-instructions in function of whether an element exists or not SyntaxNeeded pairs : optional pairs :
Additionnal explanationDetails about the arguments :
ExampleTwo tests equivalent with both ifexists and ifnotexists to trace the execution. The result of those tests depends on the visibility of #element, that you can modify in the play area (below)
{
"debug":true, "do":[
{"ifexists":"#element:visible",
],"then":[
{"alert":"the element exists and is visible"}, ],{"alert":"ifexists -> then executed"}, "else":[
{"alert":"the element might exists but is not visible"}, ]{"alert":"ifexists -> else executed"}, }, {"ifnotexists":"#element:visible", "then":[
{"alert":"ifnotexists -> then executed"},
],"else":[
{"alert":"ifnotexists -> else executed"},
]} }
Play Area#element
|
© 2009 the Zenith Team.