Skip to content

Commit

Permalink
remove legacy leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Jan 17, 2023
1 parent c8808ba commit f1a6ff8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/helpers/shadow-dom-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
* @param {attachShadowCallback} callback callback to call on shadow root
*/
export const hijackAttachShadow = (context, callback) => {
const originalAttachShadow = context.Element.prototype.attachShadow;
// eslint-disable-next-line func-names, no-param-reassign
context.Element.prototype.attachShadow = function (originalArgs) {
const shadowRoot = originalAttachShadow.call(this, originalArgs);
callback(shadowRoot);
return shadowRoot;
};

const handlerWrapper = (target, thisArg, args) => {
const shadowRoot = Reflect.apply(target, thisArg, args);
callback(shadowRoot);
Expand Down

0 comments on commit f1a6ff8

Please sign in to comment.