Giter VIP home page Giter VIP logo

Comments (4)

yiludege avatar yiludege commented on July 24, 2024

1、对于js沙箱,子应用的 iframe 会设置 base 标签,所以在里面跑的script和接口请求相对都能够正确修正
2、对于dom沙箱,框架劫持了img、a、source、link、script等元素的原型方法,当这些元素设置地址的时候会将相对地址改写成绝对地址
3、对于在css内部的比如background-image: url('./images/my-image.png')框架确实没有处理,可以参考

如果确实还有问题,可以采用插件,其中html-loader、js-loader、css-loader可以将html、js和css在运行时做替换,比如正则匹配找出相对地址链接替换成绝对地址链接从而避免去改动子应用的代码

from wujie.

18610509683 avatar 18610509683 commented on July 24, 2024

还有就是子应用的静态定位会出问题,定位到主应用里

from wujie.

yiludege avatar yiludege commented on July 24, 2024

这个方便给个复现demo吗?我这边没有复现到具体问题

from wujie.

yiludege avatar yiludege commented on July 24, 2024

3、对于在css内部的比如background-image: url('./images/my-image.png')框架确实没有处理

@18610509683 这个问题框架也已经处理了,详见 #35

from wujie.

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.