ExperimentalThe menu document to evaluate (localized or not)
Function that looks up the current value of a context key
Values for {placeholder} segments in property references
Called for each expression that fails to evaluate (rare — expressions are
validated at contribution load time). Failed expressions fail safe: when → hidden,
enabledWhen → disabled, checkedWhen → unchecked
A new menu document with expressions applied and stripped This function is unstable and may change or disappear without notice
Evaluates all when-expressions in a menu document against the current context key values.
whenevaluates falsy are removed.enabledWhengetdisabledset to the negated result.checkedWhengetcheckedset to the result.when/enabledWhen/checkedWhenfields are stripped from the output.The input document is not mutated; a deep clone is returned.