how to add CSS for a innerhtml in javascript

in my innerhtml, i have pass and fail and i want to add css properties for these. function display() { var a=document.getElementById(“myList”); var dropdownvalue = a.options [a.selectedIndex].text; var b=document.getElementById(“myText”).value; if(dropdownvalue == b.substring(0,4)) { document.getElementById(“result”).innerHTML = “Pass”; } else { document.getElementById(“result”).innerHTML = “Fail”; } }

Freshdesk CURL in Javascript CORS

I have a Curl code that adds a note to a ticket in Freshdesk, But I do not know how to execute this into a trigger button like this one const btnCreateIssue = document.getElementById(“btnCreateIssue”) btnCreateIssue.addEventListener(“click”, e=> createIssues()) async function createIssues() { curl -v -u user@yourcompany.com:test -H “Content-Type: application/json” -X POST -d ‘{ “body”:”Hi tom, Still…

Compiling SASS file into CSS string in JavaScript with loader

I have a situation where I need to get the CSS string generated from a SASS file which has been compiled in JavaScript. I have got a solution working with just CSS, using raw-loader https://github.com/webpack-contrib/raw-loader Using the following code… import css from ‘!!raw-loader!../css/styles.css’; console.log(css); However for this I need to compile the SCSS manually before…