use oxjs
This commit is contained in:
parent
8534eb9b69
commit
f855172c42
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
||||||
let txtjs = {}
|
let txtjs = {}
|
||||||
|
|
||||||
|
Ox.load({UI: {loadCSS: false}}, function() {
|
||||||
|
// ...
|
||||||
|
})
|
||||||
|
|
||||||
txtjs.open = function(url) {
|
txtjs.open = function(url) {
|
||||||
fetch(url).then(function(response) {
|
fetch(url).then(function(response) {
|
||||||
return response.text()
|
return response.text()
|
||||||
|
@ -211,7 +215,8 @@ txtjs.onMessage = function(action, data) {
|
||||||
|
|
||||||
txtjs.postMessage = function(action, data) {
|
txtjs.postMessage = function(action, data) {
|
||||||
console.log('postMessage', action, data)
|
console.log('postMessage', action, data)
|
||||||
parent.postMessage(JSON.stringify({action: action, data: data}), '*')
|
//parent.postMessage(JSON.stringify({action: action, data: data}), '*')
|
||||||
|
Ox.$parent.postMessage(action.replace('Note', 'Annotation'), data)
|
||||||
}
|
}
|
||||||
|
|
||||||
txtjs.removeNote = function() {
|
txtjs.removeNote = function() {
|
||||||
|
|
Loading…
Reference in a new issue