You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
turns out it even works without Object.defineProperty(obj, 'contentWindow', { value: null }); (which make sense, there's no contentWindow before the obj.data = '/';)!
yea this doesn't seem to be a chromium_bug_workaround.js problem even, there's just something off with reloading an already attached object to the same origin.. not sure why...
researching #96 (comment) more i learned something sad about objects.
They behave different then iframes, changing their data prop resets the window to an about:blank window synchronously. if the prop was reseted to a "legit" url, the listener will fire afterwards, but that doesn't change the fact that this object resets synchronously to an about:blank window every time data prop is being set and its load event does not fire..
can't think of a solution other than hooking into attributes setting which is something i really don't want to get into...
Well, one (risky, non-performant, buggy) hack I can think of is to use mutation events, but that's really not a good idea (they are deprecated for good reasons).
Activity
mmndaniel commentedon Jun 15, 2023
turns out it even works without
Object.defineProperty(obj, 'contentWindow', { value: null });(which make sense, there's nocontentWindowbefore theobj.data = '/';)!weizman commentedon Jun 15, 2023
yea this doesn't seem to be a chromium_bug_workaround.js problem even, there's just something off with reloading an already attached
objectto the same origin.. not sure why...weizman commentedon Jun 15, 2023
I'd expect the load listener to fire but with object it doesn't for some reason
mmndaniel commentedon Jun 15, 2023
Seems like this is the same root cause?
weizman commentedon Jun 18, 2023
does this work for you on https://lavamoat.github.io/snow/demo/? @mmndaniel
weizman commentedon Jun 18, 2023
researching #96 (comment) more i learned something sad about
objects.They behave different then iframes, changing their
dataprop resets the window to anabout:blankwindow synchronously. if the prop was reseted to a "legit" url, the listener will fire afterwards, but that doesn't change the fact that this object resets synchronously to an about:blank window every timedataprop is being set and its load event does not fire..can't think of a solution other than hooking into attributes setting which is something i really don't want to get into...
mmndaniel commentedon Jun 19, 2023
Well, one (risky, non-performant, buggy) hack I can think of is to use mutation events, but that's really not a good idea (they are deprecated for good reasons).
weizman commentedon Jun 19, 2023
Are they synchronous? Because if not they are no help unfortunately
mmndaniel commentedon Jun 20, 2023
yes they are, they are really terrible
weizman commentedon Jun 20, 2023
yea I'm starting to recall these... I'd like to avoid that if possible :(
weizman commentedon Jul 17, 2023
not scared of objects/embeds anymore thanks to #118