Make WordPress Core

Opened 15 months ago

Last modified 13 months ago

#60147 new defect (bug)

Possible bug when YouTube embeds having both loading=lazy attribute and the enablejsapi parameter

Reported by: asafm7's profile asafm7 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Embeds Keywords:
Focuses: performance Cc:

Description

When YouTube embeds have loading=lazy attribute and the enablejsapi parameter, a console error is showing:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('https://hobbies4.life').

I tried setting the origin and widget_referrer and it didn't help.

It means embeds can't be both lazy loaded and tracked for analytics.

I've opened a bug 3 times on the YouTube Issue Tracker and every time it was closed as "not reproducible", although it can be reproduced.

Maybe it relates to the way WordPress implements the API?

All details can be found here:
https://issuetracker.google.com/issues/306734400#comment1

Please let me know if more information is required.

Change History (1)

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


15 months ago

Note: See TracTickets for help on using tickets.