Comments (17)
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 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>
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.
from vue-social-sharing.
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
from vue-social-sharing.
Have you solved it yet?
from vue-social-sharing.
Not yet still looking to find it
from vue-social-sharing.
Has anyone solved this problem ?
from vue-social-sharing.
I get the same error, and did not find any info on it.
from vue-social-sharing.
I get the same error, and did not find any info on it.
from vue-social-sharing.
Got same error, and did not find any info on it.
from vue-social-sharing.
Same error no info on it.
from vue-social-sharing.
same here
from vue-social-sharing.
same here. thanks.
from vue-social-sharing.
Has anyone found a solution to this problem?
from vue-social-sharing.
Same problem
from vue-social-sharing.
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.
from vue-social-sharing.
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;
}
from vue-social-sharing.
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
from vue-social-sharing.
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;
}
},
from vue-social-sharing.
Related Issues (20)
- Cannot restart nuxt: Cannot read properties of undefined (reading 'Index') HOT 8
- SMS share problem : Android13 device can not use sms share. the body message get lost HOT 1
- Can you please add Medium network? HOT 1
- Cannot read properties of undefined (reading 'Index') HOT 8
- Types diverge from the code HOT 1
- share by line, not the "url" I defined but to the domain HOT 1
- Range Issue, When I am using min and max value dynamically it is giving different values as I take slider from min and bring it back to the min end. It was 23000 but now it is showing 20000 05 61000 HOT 1
- When click share via LINE, there are errors keep appearing until popup closed HOT 3
- This library appears to be busted when using Vue 3's script setup syntax. HOT 1
- Support for Kakao Talk HOT 1
- Change Twitter to X. HOT 2
- nuxt 3 implement HOT 3
- Fail to logging into twitter
- Error in v-on handler: "SecurityError: An attempt was made to break through the security policy of the user agent." HOT 3
- Share on Linkedin no longer working. URL to share changed.
- Email Sharing Failing
- ShareNetwork is not working properly for pinterest
- Nuxt 3 compostion compatible HOT 4
- VUE2 NUXT vue-social-sharing . Error : Uncaught DOMException: An attempt was made to break through the security policy of the user agent. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-social-sharing.