-
Notifications
You must be signed in to change notification settings - Fork 88
Block
Wiki ▸ API Reference ▸ Block
Initialize both menu (template) blocks and instance (script) blocks, maintain their state, serialize and deserialize them.
# wb.Block(obj)
Registers a block and returns a DOM element for the block.
- obj: A block object.
===
# wb.blockDesc(block)
Returns the descriptor for the block.
- block: A block object.
===
# wb.blockRegistery
An object containing all the registered blocks.
===
# wb.changeName(event)
Renames a block.
- event: An event triggered by the block to be renamed.
===
# wb.cloneBlock(block)
Makes a copy of the block.
- block: A HTML element representing the block to be cloned.
===
# wb.codeFromBlock(block)
Returns the code for a specific block.
- block: A HTML element representing the block.
===
# wb.getSockets()
Returns an array of all the sockets in a block.
===
# wb.getSocketValue(socket)
Returns the value in a socket.
- socket:
===
# wb.registerSeqNum(seqNum)
Sets sequence number to a specific value.
- seqNum: The new sequence number.
===
# wb.resetSeqNum()
Resets sequence number to 0.