web-remarq 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/{web-remarq.global.global.js → web-remarq.global.js} +9 -25
- package/dist/web-remarq.global.js.map +1 -0
- package/package.json +3 -1
- package/dist/web-remarq.global.global.js.map +0 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ WebRemarq.init({ theme: 'light' })
|
|
|
33
33
|
### Script tag
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://unpkg.com/web-remarq/dist/web-remarq.global.
|
|
36
|
+
<script src="https://unpkg.com/web-remarq/dist/web-remarq.global.js"></script>
|
|
37
37
|
<script>WebRemarq.init({ theme: 'dark' })</script>
|
|
38
38
|
```
|
|
39
39
|
|
package/dist/index.cjs
CHANGED
|
@@ -3054,6 +3054,10 @@ var WebRemarq = {
|
|
|
3054
3054
|
init(opts) {
|
|
3055
3055
|
var _a3, _b;
|
|
3056
3056
|
if (initialized) return;
|
|
3057
|
+
if (!document.body) {
|
|
3058
|
+
document.addEventListener("DOMContentLoaded", () => WebRemarq.init(opts), { once: true });
|
|
3059
|
+
return;
|
|
3060
|
+
}
|
|
3057
3061
|
options = opts != null ? opts : {};
|
|
3058
3062
|
try {
|
|
3059
3063
|
injectStyles();
|