Hello,
The controls_if block uses a mutator to control its shape. So to change the shape programmatically you'll need to pass some xml to the block's domToMutation function.
For example:
```
ifBlock.domToMutation(Blockly.textToDom('<mutation elseif="1" else="1"/>'));
```
Or maybe:
```
ifBlock.domToMutation(Blockly.textToDom('<xml><mutation elseif="1" else="1"/></xml>').firstChild);
```
(I can't remember if textToDom accepts strings that aren't wrapped in <xml></xml> tags)
I hope that helps! If you have any further questions please reply!
--Beka