Re: Ignoring unknown tag: shadow

Skip to first unread message

Beka Westberg

Nov 29, 2021, 2:30:54 PM11/29/21
Hiya James!

Looks like you've pretty much got this figured out =) You just need to change `callBlock.appendChild(shadowBlock)` to `value.appendChild(shadowBlock)`, because shadows need to be associated with an explicit connection.

I hope that helps! If you have any further questions please reply!

On Mon, Nov 29, 2021 at 6:50 AM James Smith <> wrote:
I'm trying to add a shadow block in a dynamically created toolbox category.

I have plenty of shadow blocks in the toolbox categories that are not dynamic,
I have plenty of  dynamic toolbox categories without shadow blocks that work fine

but when I add a block with a nested shadow block in the dynamic category I get the error

Ignoring unknown tag: shadow

here's a snippit of my code:

  function populateCallable(procedureList)
      const callBlock = Blockly.utils.xml.createElement("block");
      callBlock.setAttribute("type", "pi_call"); /* my custom block */
      callBlock.setAttribute("gap", "16");
      /* ... code cut for conciseness */
      const value = Blockly.utils.xml.createElement("value");
      value.setAttribute("name", "ARG0");
      const shadowBlock = Blockly.utils.xml.createElement("shadow");
      shadowBlock.setAttribute("type", "logic_null");


Is it possible to add shadow blocks in dynamic categories or am I just doing it wrong?

Many thanks

You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages