Skip to content

Commit

Permalink
Update includes/block-assets.php
Browse files Browse the repository at this point in the history
Co-authored-by: Fabian Kägy <[email protected]>
  • Loading branch information
wadebekker and fabiankaegy authored Aug 21, 2024
1 parent c50e699 commit c27881b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/block-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ function register_block_assets() {
add_action( 'enqueue_block_assets', __NAMESPACE__ . '\load_apple_map_script_in_iframe' );
/**
* Load Apple MapKit script within the editor iframe.
* This is required in order to target the correct DOM node within the iframe
* and apply the Mapkit script to it.
* This is required to ensure that the mapkit js script gets properly loaded inside the editor iframe.
* It needs to be inside the iframe so the element we want to render the Map in is in the same window
* as the mapkit script. Otherwise mapkit will throw an error saying it cannot find the element.
*/
function load_apple_map_script_in_iframe() {
if ( ! is_admin() ) {
Expand Down

0 comments on commit c27881b

Please sign in to comment.