Manipulate Document prototype for createElement
ClosedPublic

Authored by broulik on Sep 4 2019, 8:33 AM.

Details

Summary

This fixes Shadydom SHIM breaking because we overrode createElement and then the metadata it adds go missing, breaking websites.

BUG: 411556

Test Plan

(Sorry, patch directly from suse VM so I could test in Firefox ESR :D)

  • Firefox ESR 60 now has working Polymer (tested with Brightspace demo page)
  • Firefox ESR 60 document.createElement("audio") stuff still working well
  • Firefox ESR 60 "new Audio()" audio (e.g. Google Translate) still working well
  • Test in newer browsers pending

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Sep 4 2019, 8:33 AM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 4 2019, 8:33 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Sep 4 2019, 8:33 AM
fvogt accepted this revision.Sep 4 2019, 8:44 AM

The same approach should probably be used for other overrides as well, like navigator.mediaSession.setActionHandler and window.Audio. That's unrelated to the bug though.

This revision is now accepted and ready to land.Sep 4 2019, 8:44 AM
ognarb accepted this revision.Sep 4 2019, 8:48 AM

Tested in a modern browser and it still works

This revision was automatically updated to reflect the committed changes.