-
Couldn't load subscription status.
- Fork 8
Revert "feat: Remove plugins related code, which is not used (#123)"
#133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 42ffd92.
8fcce49 to
5e1bfb7
Compare
size-limit report 📦
|
| plugins: | ||
| plugins | ||
| ?.filter((p) => p.observer) | ||
| ?.map((p) => ({ | ||
| observer: p.observer!, | ||
| options: p.options, | ||
| callback: (payload: object) => | ||
| wrappedEmit( | ||
| wrapEvent({ | ||
| type: EventType.Plugin, | ||
| data: { | ||
| plugin: p.name, | ||
| payload, | ||
| }, | ||
| }), | ||
| ), | ||
| })) || [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably remove this
| const pluginHandlers: listenerHandler[] = []; | ||
| for (const plugin of o.plugins) { | ||
| pluginHandlers.push( | ||
| plugin.observer(plugin.callback, currentWindow, plugin.options), | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used
| fontObserver(); | ||
| selectionObserver(); | ||
| customElementObserver(); | ||
| pluginHandlers.forEach((h) => h()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
| for (const plugin of plugins || []) { | ||
| if (plugin.getMirror) | ||
| plugin.getMirror({ | ||
| nodeMirror: mirror, | ||
| crossOriginIframeMirror: iframeManager.crossOriginIframeMirror, | ||
| crossOriginIframeStyleMirror: | ||
| iframeManager.crossOriginIframeStyleMirror, | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
| for (const plugin of plugins || []) { | ||
| if (plugin.eventProcessor) { | ||
| e = plugin.eventProcessor(e); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
|
It's not a huge amount of code so I'd vote to keep all of it, if we keep some of the plugins code and not other it may become confusing in the future! |
0223c1b to
5e1bfb7
Compare
|
@mydea done! |
This reverts commit 42ffd92.
We need plugins to enable our custom canvas playback method. We can keep record plugins removed as we don't use them.