New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support vue hot reload. #785
Conversation
目前的代码执行 samples 中的 hello-vue 会闪退 |
我这个是 ok 的 |
你用的是这个分支吗 |
使用 gh pr checkout 785 获取的代码。没有执行 clean 操作,跟这个会有关系吗? |
需要重新编一下 bridge |
在一个新的位置 clone 了代码进行测试,仍然闪退。 控制台的输出是这个样子的
|
有没有 C++的崩溃堆栈 |
就真的是一闪就没了。控制台就那么点内容了。之前程序闪退之后还会有个框提示一下,这两次测试连提示框也没了。 |
@cnryb 修好了。window.postMessage 少了一个 return value。 |
能够正常渲染了 |
@@ -6,6 +6,7 @@ | |||
#include "window.h" | |||
#include "dart_methods.h" | |||
#include "bindings/qjs/qjs_patch.h" | |||
#include "bindings/qjs/dom/events/.gen/message_event.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看这个路径感觉怪怪的,没什么问题吧?
有两处 1、以 .
开头的目录, 2 目录名是 gen 感觉里面的东西像是用代码生成的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用了这里实现的代码生成器生成的代码
https://github.com/openkraken/kraken/tree/main/bridge/scripts/code_generator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没啥问题,生成代码只是省事
@@ -36,6 +37,7 @@ class Window : public EventTarget { | |||
ObjectFunction m_scroll{m_context, m_prototypeObject, "scroll", scrollTo, 2}; | |||
ObjectFunction m_scrollTo{m_context, m_prototypeObject, "scrollTo", scrollTo, 2}; | |||
ObjectFunction m_scrollBy{m_context, m_prototypeObject, "scrollBy", scrollBy, 2}; | |||
ObjectFunction m_postMessage{m_context, m_prototypeObject, "postMessage", postMessage, 3}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些魔法数字要找机会统一处理一下么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postMessage 有 3 个参数,这个参考 Web 标准
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些函数的最后一个数字参数都是几个参数的意思么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.