proposal-function-implementation-hiding
proposal-function-implementation-hiding copied to clipboard
Semantics of top-level directive
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?
From the current drafting spec it seems like
- top-level (script/module scope) directive is allowed
- stronger semantics always override weaker (i.e. inner scope can't override outer scope)
Am I understanding this correct?