Symptoms:
The UserWay widget icon does not appear.
widget.jsloads successfully in the browser.Pressing Ctrl + U reproduces the issue.
The browser console shows errors similar to:
Cannot read properties of null (reading 'className')
Cannot read properties of null (reading 'hasAttribute')
Cannot read properties of null (reading 'setAttribute')
Cause:
This issue is commonly caused by DOMPurify (purify.min.js), which modifies or sanitizes the page's HTML before the UserWay widget finishes initializing.
When the widget attempts to access certain page elements, those elements may have already been changed or removed, causing the initialization to fail.
How to Test:
Open the website in Chrome.
Open Developer Tools (
F12).Press Ctrl + U and check the Console for any of the errors listed above.
In Developer Tools, open Network → Network Request Blocking.
Block the following resource: https://cdnjs.cloudflare.com/ajax/libs/dompurify/.../purify.min.js
Refresh the page.
Note: Keep Developer Tools open while testing. If you close the Developer Tools window, Network Request Blocking will be disabled automatically, and the blocked request will no longer be applied after refreshing the page.
Resolution:
If blocking DOMPurify (purify.min.js) allows the UserWay widget to load correctly, the issue is not caused by the UserWay widget. Instead, it indicates that DOMPurify (or its configuration) is modifying the page in a way that prevents the widget from initializing properly. To resolve the issue, you should:
Disable DOMPurify to confirm it is the source of the issue, or
Update your Cloudflare/DOMPurify configuration to prevent it from blocking or modifying UserWay resources.
Make sure the following UserWay domains are allowed:
cdn.userway.orgapi.userway.orguserway.orgcdn77.api.userway.org
Alternatively, you can allow all UserWay resources by whitelisting:
*.userway.org
If you need assistance configuring DOMPurify or Cloudflare, please contact Cloudflare Support, as this behavior is caused by the Cloudflare configuration rather than the UserWay widget.
Need more help? Contact the UserWay Support Team — we're here to assist you.
Get in touch with UserWay Support.

