Comments (4)
感觉这块不需要在沙箱里运行,比如 mount 一般是 Fre.render(<App/>, document.getElementById("root"))
这里的 document 必须是全局 document
from berial.
感觉这块不需要在沙箱里运行,比如 mount 一般是
Fre.render(<App/>, document.getElementById("root"))
这里的 document 必须是全局 document
我提一个case呀,如果在生命周期里面需要访问子应用其他js之前定义的全局对象,是不是就访问不到了,第二个是
我看example都是主动把shadowdom root 传进去,如果生命周期函数也在沙箱里面执行的话是不是就可以改造是不是就可以小一点,proxy劫持domcument -> shadowdom root, 如果需要访问原始docuemnt可以在allowList加一个rowDocument
from berial.
proxy劫持domcument -> shadowdom root
这个是不现实的,document 和 shadow root 不是一个东西,我们之前也打算直接代理到沙雕上,但是 react 和 vue 这种框架对 document 的依赖比想象中的更多
fre 是可以的,因为 fre 只用了几个 document 的方法
你可以尝试一下,如果你能搞定的话,欢迎 pr
from berial.
我理解不用全部方法,把get dom节点的方法hack一份,就可以了,我看micro-app这边已经在用了
from berial.
Related Issues (14)
- npm run dev的时候报错 HOT 4
- 类型完善计划 HOT 1
- 使用Shadow DOM的优势是啥? HOT 2
- Cannot run the example HOT 7
- proxy using with block HOT 2
- child app modal style issue HOT 4
- 关于旧项目接入berial的注意事项
- sandbox eval error HOT 1
- webpack代码切割生成的js/css能够做到沙箱隔离吗? HOT 14
- RFC:异步渲染管线 HOT 2
- 用await async 代码清晰多了,但是貌似有些问题😊 HOT 2
- Dome 跑不通,能不能使用安装方式跑一遍 demo. 再基于不同框架试一下(vue、react, angular) HOT 3
- Demo 运行起来不正确 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from berial.