@huawei-ide/codearts 1.0.3 → 1.0.5
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/index.js +9 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { EventEmitter } from './util'
|
|
|
3
3
|
const hcOrigin = 'https://res.hc-cdn.com';
|
|
4
4
|
const iframe = document.createElement('iframe');
|
|
5
5
|
iframe.id = 'codeartside';
|
|
6
|
-
iframe.src = hcOrigin + '/codearts-core-web-static/1.0.
|
|
6
|
+
iframe.src = hcOrigin + '/codearts-core-web-static/1.0.21/resources/server/gitcode.html';
|
|
7
7
|
iframe.width = '1px';
|
|
8
8
|
iframe.height = '1px';
|
|
9
9
|
iframe.style.opacity = 0;
|
|
@@ -111,6 +111,14 @@ export function setUserId(domainId, userId) {
|
|
|
111
111
|
postMessage(message);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
export function setImgPrefix(prefix) {
|
|
115
|
+
const message = {
|
|
116
|
+
type: 'setImgPrefix',
|
|
117
|
+
data: prefix
|
|
118
|
+
};
|
|
119
|
+
postMessage(message);
|
|
120
|
+
}
|
|
121
|
+
|
|
114
122
|
function postMessage(message) {
|
|
115
123
|
iframe.contentWindow.postMessage(message, hcOrigin);
|
|
116
124
|
}
|