new hooks useScript and useAttributes
useScript
const src = "https://code.jquery.com/jquery-3.6.0.min.js";
cons done = ()=> console.log( $ );
const status = useScript(src, done);
where:
src
: javascript type resource to inject into document.headdone
: optional , callback when called at the end of the script loadstatus
: script load status
useAttributes
const attrs = useAttributes();
Where:
attrs
: all the attributes defined on the webcomponent but that are not props, to facilitate reading this hook transforms the index to camelCase