fix document events & breaking: document events removed from 'events' library temporary

This commit is contained in:
MihailRis 2026-06-03 21:50:36 +03:00
parent 8bccdc0250
commit 089bcbbb64
7 changed files with 50 additions and 55 deletions

View file

@ -13,7 +13,7 @@ InlineFrame::~InlineFrame() = default;
void InlineFrame::setSrc(const std::string& src) {
this->src = src;
if (document) {
scripting::on_ui_close(document.get(), nullptr);
scripting::on_ui_close(*document, nullptr);
document = nullptr;
root = nullptr;
}
@ -31,7 +31,7 @@ void InlineFrame::setDocument(const std::shared_ptr<UiDocument>& document) {
root->setSize(size);
gui.postRunnable([this]() {
scripting::on_ui_open(this->document.get(), {});
scripting::on_ui_open(*this->document, {});
});
}