You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The next major version of pywebview will introduce state - a way to seamlessly share data between Python and Javascript. State is represented by the pywebview.state object in Javascript and Window.state object in Python. Updating a property on either object will update its value on the other side. An example can be found here.
Additionally, each state object emits an event when state is updated. Implementation details are not set in stone, but currently the syntax is pywebview.state.addEventHandler('change', handler) and window.state += lambda key, value: pass
State is implemented by means of a proxy in Javascript and an observable class in Python.
The current ahem state can be tracked in the store branch
Ideas, suggestions or questions are welcomed
The text was updated successfully, but these errors were encountered:
The next major version of pywebview will introduce state - a way to seamlessly share data between Python and Javascript. State is represented by the
pywebview.state
object in Javascript andWindow.state
object in Python. Updating a property on either object will update its value on the other side. An example can be found here.Additionally, each state object emits an event when state is updated. Implementation details are not set in stone, but currently the syntax is
pywebview.state.addEventHandler('change', handler)
andwindow.state += lambda key, value: pass
State is implemented by means of a proxy in Javascript and an observable class in Python.
The current ahem state can be tracked in the store branch
Ideas, suggestions or questions are welcomed
The text was updated successfully, but these errors were encountered: