1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-02 20:57:43 +02:00

reveal.js can now be uninitialized by calling Reveal.destroy() #1145 #3134

This commit is contained in:
hakimel
2022-02-21 13:41:36 +01:00
parent ff20051861
commit 1e0cbe6779
11 changed files with 110 additions and 55 deletions

View File

@@ -238,4 +238,17 @@ export default class Plugins {
}
destroy() {
Object.values( this.registeredPlugins ).forEach( plugin => {
if( typeof plugin.destroy === 'function' ) {
plugin.destroy();
}
} );
this.registeredPlugins = {};
this.asyncDependencies = [];
}
}