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

Semantics of top-level directive #47

Open
Huxpro opened this issue Feb 4, 2021 · 1 comment
Open

Semantics of top-level directive #47

Huxpro opened this issue Feb 4, 2021 · 1 comment

Comments

@Huxpro
Copy link
Member

Huxpro commented Feb 4, 2021

What does top-level directives do?

'hide source';
function foo() { /* no hide source */ } // inherit?
function bar() { 'show source' } // override?

Would it be ignored?
Would there be an error?

@Huxpro
Copy link
Member Author

Huxpro commented Feb 5, 2021

From the current drafting spec it seems like

  1. top-level (script/module scope) directive is allowed
  2. stronger semantics always override weaker (i.e. inner scope can't override outer scope)

Am I understanding this correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant