Dealing with iframes. postMessage to parent iframe when certain things are opened/viewed.
This commit is contained in:
@@ -91,6 +91,9 @@ $: lq__archive_content_obj = liveQuery(async () => {
|
||||
|
||||
if (browser) {
|
||||
console.log('Browser environment detected.');
|
||||
|
||||
let message = {'archive_id': $idaa_slct?.archive_id};
|
||||
window.parent.postMessage(message, "*");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ let ae_promises: key_val = {};
|
||||
$idaa_slct.archive_content_id = idaa_archive_content_obj?.archive_content_id;
|
||||
$idaa_slct.archive_content_obj = idaa_archive_content_obj;
|
||||
|
||||
let message = {'archive_content_id': $idaa_slct?.archive_content_id};
|
||||
window.parent.postMessage(message, "*");
|
||||
|
||||
// handle_load_post_comment_obj_li({archive_id: $idaa_slct.archive_id, try_cache: false});
|
||||
|
||||
// const url = new URL(location);
|
||||
|
||||
@@ -41,6 +41,8 @@ file_icons['zip'] = 'file-archive';
|
||||
$: if (browser && $lq__archive_content_obj?.archive_content_id) {
|
||||
console.log('** Component Mounted: ** Media Player - Archive Content Obj');
|
||||
|
||||
document.body.scrollIntoView();
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.set('archive_content_id', $lq__archive_content_obj?.archive_content_id);
|
||||
// url.searchParams.set('archive_content_id', $idaa_slct?.archive_content_id);
|
||||
|
||||
Reference in New Issue
Block a user