You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
In version 9.4 and later, a change was introduced that prevents ad calls from being made if document.body isn’t ready. This issue is linked to the changes made in this commit, which added a location method for cross-frame creatives.
The error originates from the insertLocatorFrame function in adRendering.js#L258.
The issue arises when pbjs is loaded synchronously or when document.body isn’t available at the time of appendChild call.
This problem does not occur when pbjs is loaded asynchronously because the script execution is deferred until document.body is available.
Proposed Solution
Ensure that document.body is ready before attempting to call appendChild. A potential solution is to check for the existence of document.body before executing insertLocatorFrame.
Description
In version 9.4 and later, a change was introduced that prevents ad calls from being made if
document.body
isn’t ready. This issue is linked to the changes made in this commit, which added a location method for cross-frame creatives.Affected Version: 9.4+
Introduced in: PR #11863
Test Page: https://30f9d51a.demo-ann.pages.dev/testpage
Steps to Reproduce
Expected Behavior
Ad calls should be made regardless of whether document.body is fully loaded or not and no Uncaught error should be thrown by pbjs
Actual Behavior
When document.body isn’t ready, the following error is thrown, preventing ad calls from going out:
Analysis
Proposed Solution
Ensure that document.body is ready before attempting to call appendChild. A potential solution is to check for the existence of document.body before executing insertLocatorFrame.
The text was updated successfully, but these errors were encountered: