broulik created this revision. broulik added reviewers: Plasma, fvogt, ognarb. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. broulik requested review of this revision.
REVISION SUMMARY `exportFunction` doesn't carry over a prototype, nor can I assign a non-function with it afterwards. However, Firefox exports the "unsafe" stuff in `wrappedJSObject`, so I can actually get the original untrusted prototype, `exportFunction` my new function, and then set it back. I can't just use the prototype in content-script since it wouldn't be accessible from the webpage. Interestingly enough, I have to use `window.Audio` rather than `window.wrappedJSObject.Audio` for //creating// the player as the wrapped one doesn't appear to be working when used from this function. This one then still passes onto the website like normal and plays sound. BUG: 414512 TEST PLAN The websites mentioned in the bug report - https://playcanv.as/p/44MRmJRU/ - https://robostorm.io/ (without any sound but that is also without p-b-i and in Chrome) work now REPOSITORY R856 Plasma Browser Integration REVISION DETAIL https://phabricator.kde.org/D28706 AFFECTED FILES extension/content-script.js To: broulik, #plasma, fvogt, ognarb Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart