Skip to content
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

sandbox proxy result in function lose apply this #1449

Open
mokoxi opened this issue May 17, 2021 · 3 comments · May be fixed by #1518
Open

sandbox proxy result in function lose apply this #1449

mokoxi opened this issue May 17, 2021 · 3 comments · May be fixed by #1518
Labels
bug Something isn't working

Comments

@mokoxi
Copy link

mokoxi commented May 17, 2021

What happens?

eg:
const obj = {}; window.getTemplate = function(){ this.a = 'xxxxxxx'; this.b='xxxxxxx'; } window.getTemplate.apply(obj ); console.log(obj .a);
obj .a 、obj.b is undefined

getTemplate from third party npm package
A clear and concise description of what the bug is.
window.getTemplate function agent by sandbox proxy,bind window in getTargetValue

Mini Showcase Repository(REQUIRED)

Provide a mini GitHub repository which can reproduce the issue.

How To Reproduce

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

  • qiankun Version:
  • Platform Version:
  • Browser Version:
@mokoxi
Copy link
Author

mokoxi commented May 18, 2021

const obj = {};
window.getTemplate = function(){ this.a = 'xxxxxxx'; this.b='xxxxxxx'; }
window.getTemplate.apply(obj ); console.log(obj .a);
obj .a 、obj.b is undefined

getTemplate from third party npm package

@kuitos kuitos added the bug Something isn't working label May 22, 2021
@mokoxi
Copy link
Author

mokoxi commented May 24, 2021

@kuitos hi gays,When will this problem be fixed,thanks~

@BruceCham
Copy link

mark

@godky godky linked a pull request Jun 17, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants