Is this possible?

If script is ok to be in HTML component, doesn’t need access to parent site structure - you can use HTML comp, and it’s actually not WixCode) If it needs access - it’s something that you cant achive with WixCode anyway