chakra-core / chakra-core/ChakraCore
Insufficient documentation for the `sourceUrl` argument to the `JsRunScript` function
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
The documentation for `JsRunScript` function at https://github.com/microsoft/ChakraCore/wiki/JsRunScript doesn't really tell much about allowed values (including the null pointer) and their interpretation for the `sourceUrl` argument:
> sourceUrl: The location the script came from.
Scripts do not always come from "locations" as these uniform locations cannot be identified -- since one simply passes strings to `JsRunScript`, it makes no sense to mandate a location for such script.
I assumed the argument was optional and tried to pass `NULL` as value, but the function returned an error. What are my options? Am I supposed to cook up a bogus location to indicate no location condition? Like an empty string, for instance?
Contributor guide
Assessment
This issue has not been assessed yet.