Open hasanrazahabi opened 7 months ago
Have you solved it yet?
Not yet still looking to find it
Has anyone solved this problem ?
I get the same error, and did not find any info on it.
I get the same error, and did not find any info on it.
Got same error, and did not find any info on it.
Same error no info on it.
same here
same here. thanks.
Has anyone found a solution to this problem?
Same problem
First, you need to create a ref for the ShareNetwork
component and set up an event listener to track when it opens. Also, you need to assign an event listener to the open
event, which triggers the runWorkaround
function (will be described in the next paragraph):
const shareNetworkRef = ref(null);
<template>
<ShareNetwork ref="shareNetworkRef" @open="runWorkaround" />
</template>
Due to security restrictions, the popupWindow
object cannot be accessed . To address this, we've implemented a workaround that involves clearing this variable and stopping the interval, which checks if the popup has been closed:
function runWorkaround(index: number): void {
if (shareNetworkRef.value === null) return;
clearInterval(shareNetworkRef.value.popupInterval);
shareNetworkRef.value.popupWindow = undefined;
}
By applying this workaround, you will lose the ability to monitor the 'close' event of the ShareNetwork
component. It's important to note that in the current implementation, tracking the 'close' event is not functioning correctly either. Therefore, although this workaround has a limitation, it addresses the existing issue by providing a temporary solution.
A possible workaround
Setting Up a Reference and Tracking the "Open" Event for ShareNetwork
First, you need to create a ref for the
ShareNetwork
component and set up an event listener to track when it opens. Also, you need to assign an event listener to theopen
event, which triggers therunWorkaround
function (will be described in the next paragraph):const shareNetworkRef = ref(null); <template> <ShareNetwork ref="shareNetworkRef" @open="runWorkaround" /> </template>
Implementing the Workaround Function
Due to security restrictions, the
popupWindow
object cannot be accessed . To address this, we've implemented a workaround that involves clearing this variable and stopping the interval, which checks if the popup has been closed:function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return; clearInterval(shareNetworkRef.popupInterval); shareNetworkRef.popupWindow = undefined; }
Important Consideration
By applying this workaround, you will lose the ability to monitor the 'close' event of the
ShareNetwork
component. It's important to note that in the current implementation, tracking the 'close' event is not functioning correctly either. Therefore, although this workaround has a limitation, it addresses the existing issue by providing a temporary solution.
Thank Your so much. I fixed this problem. Buts you need change your function like this: ` function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return;
clearInterval(shareNetworkRef.value.popupInterval); shareNetworkRef.value.popupWindow = undefined; } ` Because shareNetworkRef is ref
A possible workaround
Setting Up a Reference and Tracking the "Open" Event for ShareNetwork
First, you need to create a ref for the
ShareNetwork
component and set up an event listener to track when it opens. Also, you need to assign an event listener to theopen
event, which triggers therunWorkaround
function (will be described in the next paragraph):const shareNetworkRef = ref(null); <template> <ShareNetwork ref="shareNetworkRef" @open="runWorkaround" /> </template>
Implementing the Workaround Function
Due to security restrictions, the
popupWindow
object cannot be accessed . To address this, we've implemented a workaround that involves clearing this variable and stopping the interval, which checks if the popup has been closed:function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return; clearInterval(shareNetworkRef.popupInterval); shareNetworkRef.popupWindow = undefined; }
Important Consideration
By applying this workaround, you will lose the ability to monitor the 'close' event of the
ShareNetwork
component. It's important to note that in the current implementation, tracking the 'close' event is not functioning correctly either. Therefore, although this workaround has a limitation, it addresses the existing issue by providing a temporary solution.Thank Your so much. I fixed this problem. Buts you need change your function like this: ` function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return;
clearInterval(shareNetworkRef.value.popupInterval); shareNetworkRef.value.popupWindow = undefined; } ` Because shareNetworkRef is ref
Oh, missed it. Thank you, fixed.
I am using Javascript and Vue 3 Version:- This is Working For me.
index is not required const shareNetworkRef = ref(null);
const runWorkaround = (index) => { if (shareNetworkRef.value === null) return;
clearInterval(shareNetworkRef.value.popupInterval); shareNetworkRef.value.popupWindow = undefined; }
A possible workaround
Setting Up a Reference and Tracking the "Open" Event for ShareNetwork
First, you need to create a ref for the
ShareNetwork
component and set up an event listener to track when it opens. Also, you need to assign an event listener to theopen
event, which triggers therunWorkaround
function (will be described in the next paragraph):const shareNetworkRef = ref(null); <template> <ShareNetwork ref="shareNetworkRef" @open="runWorkaround" /> </template>
Implementing the Workaround Function
Due to security restrictions, the
popupWindow
object cannot be accessed . To address this, we've implemented a workaround that involves clearing this variable and stopping the interval, which checks if the popup has been closed:function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return; clearInterval(shareNetworkRef.popupInterval); shareNetworkRef.popupWindow = undefined; }
Important Consideration
By applying this workaround, you will lose the ability to monitor the 'close' event of the
ShareNetwork
component. It's important to note that in the current implementation, tracking the 'close' event is not functioning correctly either. Therefore, although this workaround has a limitation, it addresses the existing issue by providing a temporary solution.Thank Your so much. I fixed this problem. Buts you need change your function like this:
function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return; clearInterval(shareNetworkRef.value.popupInterval); shareNetworkRef.value.popupWindow = undefined; }
Because shareNetworkRef is refOh, missed it. Thank you, fixed.
VUE2 NUXT vue-social-sharing . Error : Uncaught DOMException: An attempt was made to break through the security policy of the user agent. May I how to handle this issue? Thank you for your support.
Uncaught DOMException: An attempt was made to break through the security policy of the user agent. at ie (https://www.XXXX.com/_nuxt/a1925a6.js:2:12130) at Object.get [as popupWindow] (https://www.XXXX.com/_nuxt/a1925a6.js:2:10906) at vo.get [as popupWindow] (https://www.XXXX.com/_nuxt/a1925a6.js:2:40591) at https://www.XXXX.com/_nuxt/dadf402.js:2:64148
A possible workaround
Setting Up a Reference and Tracking the "Open" Event for ShareNetwork
First, you need to create a ref for the
ShareNetwork
component and set up an event listener to track when it opens. Also, you need to assign an event listener to theopen
event, which triggers therunWorkaround
function (will be described in the next paragraph):const shareNetworkRef = ref(null); <template> <ShareNetwork ref="shareNetworkRef" @open="runWorkaround" /> </template>
Implementing the Workaround Function
Due to security restrictions, the
popupWindow
object cannot be accessed . To address this, we've implemented a workaround that involves clearing this variable and stopping the interval, which checks if the popup has been closed:function runWorkaround(index: number): void { if (shareNetworkRef.value === null) return; clearInterval(shareNetworkRef.value.popupInterval); shareNetworkRef.value.popupWindow = undefined; }
Important Consideration
By applying this workaround, you will lose the ability to monitor the 'close' event of the
ShareNetwork
component. It's important to note that in the current implementation, tracking the 'close' event is not functioning correctly either. Therefore, although this workaround has a limitation, it addresses the existing issue by providing a temporary solution.
For anybody still using the Option API, you can do the same thing like this:
methods: {
runWorkaround() {
if (this.$refs.shareNetworkRef === null) return;
clearInterval(this.$refs.shareNetworkRef.popupInterval);
this.$refs.shareNetworkRef.popupWindow = undefined;
}
},
I am using Javascript and Vue 3 Version:- This is Working For me.
index is not required const shareNetworkRef = ref(null);
const runWorkaround = (index) => { if (shareNetworkRef.value === null) return;
clearInterval(shareNetworkRef.value.popupInterval); shareNetworkRef.value.popupWindow = undefined; }
Index is needed when we are working with multiple sharing. I resolved the issue with.
console.log("shared network ref", shareNetworkRef.value[index]);
if (shareNetworkRef.value[index] === null) return;
clearInterval(shareNetworkRef.value[index].popupInterval);
shareNetworkRef.value[index].popupWindow = undefined;
};
I am getting this issue anyone other has such kind of issue please let me know how to fix it.