I do want to clear a misconception here. cst_load(url) is not a primitive function, it's an extension function. The extension block was just named "primitive" in snap 9, but was renamed to it's actual function, "extension".
@tvorimvsevmeste what the SVG to costume block is doing, is just creating a data url of the input svg (which just turns some file into a url, such as svg text), and the load it with this block.
Of course you (usually) never have to see this block outside custom blocks, because the extension blocks are meant to be used inside custom blocks, not really by average users (or at least, you're meant to create a custom block that uses the extension function you want, so it can be a lot more clear as to what the block is doing).
Thanks @ego-lay_atman-bay. I got it in general. But nevertheless @dardoro gave an example of two homemade blocks "SVG 2 Costume ()" and "*()..."
Is it possible to see THEIR structure somehow?
You can actually drag and drop the script pic into snap (or download the image, and import it), and then you'll get the blocks from the image, which allows you to see the block definition, and see how they made the block.
The problem is... it doesn't load for me (I didn't add newlines, maybe that's why? would be weird if so). It just clips out most of my costume and console.logging it gives us a Costume rather than a SVG_Costume
It has the viewBox set to 0 0 2 0.75, and I have no idea what you mean by "viewbox of path" because there's just a viewbox on the whole svg, not just the path.
You may debug the original procedure to test why the size of the SVG_costume does not match declared viewbox. Of course you should note that loading image by data-URL may be asynchronous.