Change tab color

Hi Guys

I user Aras Version 11SP9.When form onLoad. I want to change tab color
but I set attribute has error.
----My Code-----
var rel_dom = parent.relationships.document;
var style = "background-color:#0000ff;color: #ffffff;";
var relId = itm.getProperty("ext_tab_name", "");
var tab = rel_dom.querySelector('li[data-id="' + relId + '"]'); ==>Get null
tab.setAttribute("style", style); ==> error message: Cannot read property 'setAttribute' of null