@huawei-ide/codearts 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/index.js +9 -1
  2. 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.19/resources/server/gitcode.html';
6
+ iframe.src = hcOrigin + '/codearts-core-web-static/1.0.20/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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huawei-ide/codearts",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {