Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

replaceAll function is being marked as…?

The code you are seeing technically works. But VS Code, shows me an underline under the replaceAll function. I would like to know why, and what I could do to avoid this happening again.

renderTemplateText(str) {
    var parser = new DOMParser();
    var doc = parser.parseFromString(str, "text/html");
    var xRepeat = doc.querySelectorAll('[x-repeat]');
    var divarray = doc.querySelectorAll('[is^="x-"]');
    var divarraylength = divarray.length;


    for (var i = 0; i < divarraylength; i++) {                                                           
            var dataAttribute = divarray[i].getAttribute('data-link');                                                  
            console.log(divarray[i]);                                                    
            if (dataAttribute !== null) {                                           
                dataAttribute = dataAttribute.replaceAll("props", this.propsname);
            }                                                              
            console.log(dataAttribute );
    }
}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Youcan honestly just ignore this. Its just an "VS-Code thing".
I am assuming, it works? I made the not given value props myself, and it worked fine.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading