GithubHelp home page GithubHelp logo

Comments (6)

phodal avatar phodal commented on July 26, 2024

postMessage 的应用侵入性太强是指?

from microfrontends.

nuonuoge avatar nuonuoge commented on July 26, 2024

文章中这段:
通讯机制。直接在每个应用中创建 postMessage 事件并监听,并不是一个友好的事情。其本身对于应用的侵入性太强,因此通过 iframeEl.contentWindow 去获取 iFrame 元素的 Window 对象是一个更简化的做法。随后,就需要定义一套通讯规范:事件名采用什么格式、什么时候开始监听事件等等。

from microfrontends.

phodal avatar phodal commented on July 26, 2024

就是需要修改相关的事件代码而已

from microfrontends.

nuonuoge avatar nuonuoge commented on July 26, 2024

在mooa框架里面获取子的window对象,然后在mooa框架统一为子window添加事件方法,而不是去每个子应用里面写,非侵入是指这样吗

from microfrontends.

phodal avatar phodal commented on July 26, 2024

是的。相当于提供一个公共的 pub-sub

from microfrontends.

nuonuoge avatar nuonuoge commented on July 26, 2024

好滴,感谢解答

from microfrontends.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.