Skip to content

Commit

Permalink
fixed parted with single output setup
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Mar 15, 2024
1 parent a5f3f81 commit 2909c92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,23 @@ class RWSClient {
(await Promise.all(_all)).forEach((scriptCnt: string, key: number) => {
const script: HTMLScriptElement = document.createElement('script');
script.textContent = scriptCnt;
script.async = true
script.type = 'text/javascript';
document.body.appendChild(script);

console.log(`Appended ${componentParts[key]} component`);
});

RWSClient.defineAllComponents();
}

static defineAllComponents() {
const richWindowComponents: RWSWindowComponentRegister = (window as Window & RWSWindow).RWS.components;

const devStr = 'book-loader';
// provideRWSDesignSystem().register(richWindowComponents[devStr].component);


Object.keys(richWindowComponents).map(key => richWindowComponents[key].component).forEach((el: IWithCompose<RWSViewComponent>) => {
Object.keys(richWindowComponents).map(key => richWindowComponents[key].component).forEach((el: IWithCompose<RWSViewComponent>) => {
el.define(el, el.definition);
});

return;
}

private getBrowserObject(): RWSWindow
Expand Down
7 changes: 2 additions & 5 deletions src/components/_attrs/sanitize-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ function modifyPropertyDescriptor(target: any, propertyKey: string, config: IOpt
return this[privatePropName];
},
set(value: any) {
if (typeof value === 'string') {
console.log('sanitizing', value);
this[privatePropName] = RWSContainer().get(DOMService).sanitizeHTML(value, null, config);
console.log('sanitized', this[privatePropName], config);

if (typeof value === 'string') {
this[privatePropName] = RWSContainer().get(DOMService).sanitizeHTML(value, null, config);
} else {
this[privatePropName] = null;
}
Expand Down
1 change: 1 addition & 0 deletions src/service_worker/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = {
resolve: {
extensions: ['.ts', '.js'],
alias: {
document: false,
globalThis: gThis,
'@cwd' : process.cwd(),
// 'rws-js-client': path.resolve(__dirname, '..') + '/index.ts',
Expand Down

0 comments on commit 2909c92

Please sign in to comment.