PlotlyJS vs Plots+plotlyjs()

I got the resizing working to some extent while the program is running using

w = pl.window
ws = size(w)
relayout!(pl, Dict(:width=>ws[1], :height=>ws[2]))

Somehow it doesn’t seem the right way to go though.
Given that it only works while the window is actively controlled from Julia.