[wp-trac] [WordPress Trac] #44306: wp-embed-template.js Sends a message earlier than the wp-embed.js listener will be installed
WordPress Trac
noreply at wordpress.org
Tue Jun 5 11:40:14 UTC 2018
#44306: wp-embed-template.js Sends a message earlier than the wp-embed.js listener
will be installed
--------------------------+-----------------------------
Reporter: Cawa-93 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 4.9.6
Severity: major | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
I use google chrome v67.0.3396.62
In the content of the page is inserted a link to another page of the same
site.
This link is replaced by the iframe.
However, this frame is loaded before downloading the listener's wp-embed.
Because of this, the frame does not update its height and does not replace
the blockquote element
I enabled debugging and added the output to the console to monitor the
execution order. Here is the result:
{{{
14:36:01.651 (index):758 sendEmbedMessage(height, 348)
14:36:02.134 wp-embed.js?ver=4.9.6:121 addEventListener(message)
14:36:02.588 wp-embed.js?ver=4.9.6:89 onLoad()
14:36:04.889 wp-embed.js?ver=4.9.6:89 onLoad()
}}}
The widget only appears if you resize the page after loading the page.
Here is the log
{{{
14:36:08.091 (index):758 sendEmbedMessage(height, 250)
14:36:08.092 wp-embed.js?ver=4.9.6:31 receiveEmbedMessage data: {message:
"height", value: 250, secret: "Fr0AAXkEeU"}
14:36:08.240 (index):758 sendEmbedMessage(height, 250)
14:36:08.240 wp-embed.js?ver=4.9.6:31 receiveEmbedMessage data: {message:
"height", value: 250, secret: "Fr0AAXkEeU"}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44306>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list