@huawei-ide/codearts 1.0.5 → 1.0.7
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.23/resources/server/gitcode.html';
|
|
7
7
|
iframe.width = '1px';
|
|
8
8
|
iframe.height = '1px';
|
|
9
9
|
iframe.style.opacity = 0;
|
|
@@ -119,6 +119,14 @@ export function setImgPrefix(prefix) {
|
|
|
119
119
|
postMessage(message);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
export function setFilePrefix(prefix) {
|
|
123
|
+
const message = {
|
|
124
|
+
type: 'setFilePrefix',
|
|
125
|
+
data: prefix
|
|
126
|
+
};
|
|
127
|
+
postMessage(message);
|
|
128
|
+
}
|
|
129
|
+
|
|
122
130
|
function postMessage(message) {
|
|
123
131
|
iframe.contentWindow.postMessage(message, hcOrigin);
|
|
124
132
|
}
|