summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/README.wasm.md8
-rw-r--r--static/source/embindmaker/embindmaker.cxx3
2 files changed, 5 insertions, 6 deletions
diff --git a/static/README.wasm.md b/static/README.wasm.md
index e37242508b72..f2abc8219ce8 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -223,8 +223,8 @@ improvement! ;)
Some usage examples through javascript of the current implementation:
```js
// inserts a string at the start of the Writer document.
-init_unoembind_uno(Module);
-let css = Module.unoembind_uno.com.sun.star;
+let uno = init_unoembind_uno(Module);
+let css = uno.com.sun.star;
xModel = Module.getCurrentModelFromViewSh();
xTextDocument = new css.text.XTextDocument(xModel.$query());
xText = xTextDocument.getText();
@@ -238,8 +238,8 @@ xModel.delete(); xTextDocument.delete(); xText.delete(); xSimpleText.delete(); x
```js
// changes each paragraph of the Writer document to a random color.
-init_unoembind_uno(Module);
-let css = Module.unoembind_uno.com.sun.star;
+let uno = init_unoembind_uno(Module);
+let css = uno.com.sun.star;
xModel = Module.getCurrentModelFromViewSh();
xEnumAccess = new css.container.XEnumerationAccess(xText.$query());
xParaEnumeration = xEnumAccess.createEnumeration();
diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx
index 335b7983503c..37175d100cdf 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -955,8 +955,7 @@ SAL_IMPLEMENT_MAIN()
}
jsOut << "function init_unoembind_" << name
<< "(instance) {\n"
- " instance.unoembind_"
- << name << " = {\n";
+ " return {\n";
writeJsMap(jsOut, *module, " ");
jsOut << " };\n"
"};\n";