How to dynamically load a JS file in JavaScript https://www.educative.io/answers/how-to-dynamically-load-a-js-file-in-javascript function loadJS ( FILE_URL , async = true ) { let scriptEle = document . createElement ( "script" ); scriptEle . setAttribute ( "src" , FILE_URL ); scriptEle . setAttribute ( "type" , "text/javascript" ); scriptEle . setAttribute ( "async" , async ); document . body . appendChild ( scriptEle ); // success event scriptEle . addEventListener ( "load" , () => { console . log ( "File loaded" ) }); // error event scriptEle . addEventListener ( "error" , ( ev ) => { console . log ( "Error on loading file" , ev ); ...
Association For me as a new developer working on odoo community and providing services to the customers using the community version of Odoo...mohamed Alkobrosly keep it up all shall be well with you as long as you have pure heart.
ReplyDelete