Skip to content

Commit

Permalink
Add browser shim
Browse files Browse the repository at this point in the history
Signed-off-by: macdonst <[email protected]>
  • Loading branch information
macdonst committed Oct 30, 2023
1 parent a4aa348 commit f4a1f44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
if (typeof process !== 'undefined') {
global.HTMLElement = function() { return {} }
global.customElements = { define: function() { } }
global.Worker = function() { return { postMessage: function() { } } }
}

export default class BaseElement extends HTMLElement {
constructor() {
super()
Expand Down

0 comments on commit f4a1f44

Please sign in to comment.