Skip to content

Commit

Permalink
Add data-ouia-safe on chrome init. (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 authored Dec 9, 2020
1 parent 09cb79e commit b853802
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/chrome/create-chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const createChromeInstance = (jwt, insights) => {
});

const init = () => {
/**
* Mutate the root element to enable QA during app init.
* Previously was done from applications after react-dom render.
*/
const rootEl = document.getElementById('root');
if (rootEl) {
rootEl.setAttribute('data-ouia-safe', true);
}
window.insights.chrome = {
...window.insights.chrome,
...chromeInit(navResolver),
Expand Down

0 comments on commit b853802

Please sign in to comment.