The example code used javascript that can't be made in blocks. After this change it can be reproduced in blocks.