<table><tr><td style="">broulik updated this revision to Diff 64957.<br />broulik retitled this revision from "Call window.postMessage with targetOrigin" to "Use custom event rather than window.postMessage".<br />broulik edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-4mn5dyjsfdli3lm/">(Show Details)</a><br />broulik edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-gyq2qdmtuitkn3d/">(Show Details)</a><br />broulik added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D23568">View Revision</a></tr></table><br /><div><div><ul class="remarkup-list">
<li class="remarkup-list-item">Use custom event</li>
</ul></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">According to documentation [1] `targetOrigin` is a required argument. Apparently it has to be "*" for messaging to an extension.<br />
Neither Firefox, nor Chrome cared about the lack of this argument. Chrome doesn't even mention this argument in its documentation [2]. Waterfox (which we don't officially support and I didn't even know existed) however complains.<br />
<br />
[1] https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`window.postMessage` requires a `targetOrigin` which isn't enforced by all browsers.</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">[2] https://developer.chrome.com/extensions/messaging</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">This patch changes it to send a custom event which reduces the likelihood of interference and eavesdropping.</span><br />
<br />
BUG: 411423</div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* Water</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Fire</span>fox <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">has working YouTube controls now<br />
* Firefox and Chrome behave unchanged</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">and Chrome still get proper media controls</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">(I'm not going to do an "emergency release" as</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">*</span> Waterfox <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">isn't officially supported by us, unless David wants to)</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">works fine now</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R856 Plasma Browser Integration</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D23568?vs=64951&id=64957">https://phabricator.kde.org/D23568?vs=64951&id=64957</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23568">https://phabricator.kde.org/D23568</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>extension/content-script.js</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, ognarb, fvogt, davidedmundson<br /><strong>Cc: </strong>plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>