@cocreate/text 1.18.41 → 1.18.43
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/CHANGELOG.md +14 -0
- package/package.json +6 -6
- package/src/index.js +12 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [1.18.43](https://github.com/CoCreate-app/CoCreate-text/compare/v1.18.42...v1.18.43) (2023-01-30)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* catch cross-origin error when accessing window.top ([2753de1](https://github.com/CoCreate-app/CoCreate-text/commit/2753de13aac3973358bcfac2b256a152a35b2b9e))
|
7
|
+
|
8
|
+
## [1.18.42](https://github.com/CoCreate-app/CoCreate-text/compare/v1.18.41...v1.18.42) (2023-01-29)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* bump dependencies ([6925572](https://github.com/CoCreate-app/CoCreate-text/commit/692557282e994418c64cc23e84db3006c0f0dfde))
|
14
|
+
|
1
15
|
## [1.18.41](https://github.com/CoCreate-app/CoCreate-text/compare/v1.18.40...v1.18.41) (2023-01-29)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cocreate/text",
|
3
|
-
"version": "1.18.
|
3
|
+
"version": "1.18.43",
|
4
4
|
"description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
5
5
|
"keywords": [
|
6
6
|
"text",
|
@@ -61,11 +61,11 @@
|
|
61
61
|
},
|
62
62
|
"dependencies": {
|
63
63
|
"@cocreate/actions": "^1.5.55",
|
64
|
-
"@cocreate/crdt": "^1.16.
|
65
|
-
"@cocreate/crud-client": "^1.18.
|
66
|
-
"@cocreate/cursors": "^1.14.
|
67
|
-
"@cocreate/docs": "^1.5.
|
68
|
-
"@cocreate/hosting": "^1.7.
|
64
|
+
"@cocreate/crdt": "^1.16.1",
|
65
|
+
"@cocreate/crud-client": "^1.18.3",
|
66
|
+
"@cocreate/cursors": "^1.14.1",
|
67
|
+
"@cocreate/docs": "^1.5.10",
|
68
|
+
"@cocreate/hosting": "^1.7.10",
|
69
69
|
"@cocreate/observer": "^1.5.59",
|
70
70
|
"@cocreate/selection": "^1.4.64",
|
71
71
|
"@cocreate/utils": "^1.17.22",
|
package/src/index.js
CHANGED
@@ -107,10 +107,20 @@ function initElement (element) {
|
|
107
107
|
}
|
108
108
|
|
109
109
|
function initDocument(doc) {
|
110
|
-
let documents
|
110
|
+
let documents;
|
111
|
+
try {
|
112
|
+
documents = window.top.textDocuments;
|
113
|
+
} catch(e) {
|
114
|
+
console.log('cross-origin failed')
|
115
|
+
}
|
116
|
+
|
111
117
|
if (!documents){
|
112
118
|
documents = new Map();
|
113
|
-
|
119
|
+
try {
|
120
|
+
window.top.textDocuments = documents;
|
121
|
+
} catch(e) {
|
122
|
+
console.log('cross-origin failed')
|
123
|
+
}
|
114
124
|
}
|
115
125
|
if (!documents.has(doc)) {
|
116
126
|
documents.set(doc);
|