Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-ouia-safe on chrome init. #1098

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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