script-lab
script-lab copied to clipboard
Loading a sample doesn't check if the api_set is supported
Bug Report
- Host: N/A
- OS: N/A
- Browser: N/A
- Environment: prod
Expected behavior:
Loading a sample marked as a higher requirement set than supported (using the api_set
key) should fail.
Actual behavior:
Samples with unsupported features are successfully loaded. It should only be noted that the call to isSetSupported
in Script Lab is using the deprecated variant that takes in a number instead of a string. This means won't behave correctly with requirement sets like ExcelApi 1.10. There's also no consideration for online-only requirement sets, like ExcelOnlineApi 1.1
.
Steps to Reproduce:
- Load the "Track changes" sample in Word on Windows (it uses online-only API and is marked as 1.4; Word on Windows only supports up to 1.3)
Screenshot:
What happens:
What should happen:
Good point. Per my understanding, it's better to always check the API set in our code...
Zero-trust 😂