I am currently developing a plugin for figma. As you know, you will work with two .js files and one ui.html file I am wondering if there is any way to update the ui.html when the canvas changes I know that the appropriate way to send data from the ui to the canvas is by using this in the ui.js file
parent.postMessage({ pluginMessage: { type: 'msg' } }, '*')
and using this line in the code.js file :
figma.ui.onmessage = msg =>{
if(msg.type==="msg"){
// ...
}
}
so is there a way to send data in the opposite way ?