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
#1272 makes full use of the second map argument of the built in Array.from
I discovered today that MooTools < 1.6 implements their own version of Array.from, which lacks the second argument, so if an old version of mootools is on a website it messes things up — or also an old version of Prototype (e.g. 1.7.1)
I did a similar 'guard' for Date.now being overwritten in #1196
Is it a good idea to do the same in this case?
There might be small performance loss from an extra function, but main question would be whether it is our responsibility to patch over this sort of thing?
Here is a test to undo changes from 3rd party libraries:
if (Array.from([1], (x)=>x*2)[0] !== 2) {
// https://stackoverflow.com/a/8580576/6691
const dummy_iframe = document.createElement("iframe");
document.documentElement.appendChild(dummy_iframe);
Array.from = dummy_iframe.contentWindow.Array.from; // a clean working version
//Array.prototype.from = dummy_iframe.contentWindow.Array.prototype.from; // this is given in SO answer but doesn't work for some reason
document.documentElement.removeChild(dummy_iframe);
}
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Actually I completely forgot I had this issue open, but suggested the same fix again which got merged with #1464 so this should no longer be an issue if you are using the latest code.
Open up a new issue or PR if 1464 doesn't fix things for you.
Preflight Checklist
What package is this bug report for?
rrweb
Version
latest version with #1272 applied
Expected Behavior
inline styles recorded correctly
Actual Behavior
inline styles recorded as follows:
Steps to Reproduce
#1272 makes full use of the second map argument of the built in Array.from
I discovered today that MooTools < 1.6 implements their own version of Array.from, which lacks the second argument, so if an old version of mootools is on a website it messes things up — or also an old version of Prototype (e.g. 1.7.1)
I did a similar 'guard' for Date.now being overwritten in #1196
Is it a good idea to do the same in this case?
There might be small performance loss from an extra function, but main question would be whether it is our responsibility to patch over this sort of thing?
Here is a test to undo changes from 3rd party libraries:
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: