rulrok
#1
Hi.
I’m developing a SPA and Twitter’s widget.js javascript is causing a memory leak.
When only adding widget.js and removing it completly, it seems to be fine.
Once I use twttr.widgets.createTimeline(), then the problem comes up.
Here is a fiddle where I was even trying to manually ensuring that all attached events were removed.
When asking to create the timeline, a request is made to:
https://platform.twitter.com/js/timeline.b0a587d0d4f12c2689ad7e638140e2c7.js
I am suspecting that this leaving some event behind. I see there are pairs of eventListeners add and remove for click, but only one addEventListener for ‘load’ (I guess it is an iframe element).
I was trying to whack all and everything I could, but some references are kept in memory coming from ‘widget.js’.
I don’t know how widget.js and timeline.js interact.
Twitter js plugin is simply unreasonable for SPAs.
We are very sorry to hear you feel that this is (in your words) “unreasonable” but there is no need to use such emotive language here. we definitely thank you for your comments and thoughts on our web widgets. I’ll make sure the relevant team sees this report. We appreciate your patience and support.
1 Like
system
Closed
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.