DOM.injectStyles to inject the styles, but the question is, can I do the injection with an
I want to delete the previous one to inject style again so I need an id for finding and deleting it but now without the possibility of deletion, a new style will be added to the page that will increase the size of the page.
At the moment the method doesn’t seem to support what you describe. But you can extend it to have the ability to treat second parameter as id. Then upon injecting the same id, we replace the old style text with new text. It could be a nice PR
For a solution for what you are trying to do, you can also do it like this.
let styleTag = DOM.createElement('style');
styleTag.type = 'text/css';
styleTag.id = 'tag-id';
styleTag.innerHtml = //your css here;