-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: allow the dialog methods to take in extra parameters #8084
Conversation
This PR is causing tests in blockly-samples repository to fail for
Linking to the commit before this PR landed prevents the test failures. |
After discussing with @BeksOmega, our working theory was that the test failure was being caused by the call to sinon.stub() in the Having looked at var alert$$internal = (a,b) => {
window.alert(a);
b&&b()
},
module$build$src$core$dialog = {
get alert(){ return alert$$internal },
// ...
}; …where the object declared as In other words: Closure Compiler does correctly support It's possible in principle for such an accessor to be stubbed, but Sinon would have to use |
The basics
The details
Resolves
Fixes #7882
Proposed Changes
Makes it so the
setX
dialog methods assign directly to the property on the exported namespace tree instead of to an internal variable.Reason for Changes
Fixes a problem for Scratch where they didn't have a good place for their dialog code to live.
Test Coverage
Added tests that assigned dialogmethods can take in extra parameters.
Documentation
This is pretty niche so I don't think it needs explicit documentation.
Additional Information
This doesn't have to go into v11, I just put it up against that in case it can be reviewed in time.