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

Add an option to pass undefined as null instead of ClearScript.Undefined #154

Closed
77it opened this issue Jan 9, 2020 · 1 comment
Closed
Assignees

Comments

@77it
Copy link

77it commented Jan 9, 2020

I'm writing a project that uses JavaScript to personalize the business logic.

As a fallback to ClearScript for non-windows platforms I support also Jint (until ClearScript will support other platforms, then I won't have to work with 2 engines anymore).

Doing some tests on null I stumbled upon the conversion of undefined parameters in ClearScript.Undefined.

I understand that there are valid reasons to convert undefined to an object ClearScript.Undefined but I like much more the Jint approach to convert all to null, that is also more compatible between engines.

Then I propose a new switch to be able to convert all to null instead of ClearScript.Undefined.

I've prepared a fiddle to show a working test case (with the other engine).

Thanks for what you could do about my proposal.

@ClearScriptLib ClearScriptLib self-assigned this Jan 9, 2020
ClearScriptLib added a commit that referenced this issue Apr 13, 2020
…Hub Issue #160); fixed 64-bit V8 initialization on Azure App Service (GitHub Issue #166); enabled DirectAccess for ComVisible .NET objects (GitHub Issue #161); added ScriptEngine.ExposeHostObjectStaticMembers (GitHub Issue #152); added ScriptEngine.UndefinedImportValue and made Undefined.Value public (GitHub Issue #154); enhanced ExtendedHostFunctions.typeLibEnums to pull in external enumerations; added thread affinity enforcement in WindowsScriptEngine.Dispose; eliminated KeyNotFoundException when checking for system documents (GitHub Issue #169); enabled the use of the application's root folder as a backup for its local data folder (GitHub Issue #171); reduced minimum CPU profile and heap size sampling intervals to 125 ms; updated deployment and API documentation, resolving GitHub Issues #158 and #159. Tested with V8 8.1.307.28.
@ClearScriptLib
Copy link
Collaborator

ClearScriptLib commented Apr 13, 2020

Version 6.0.1 adds ScriptEngine.UndefinedImportValue and makes Undefined.Value public.

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

No branches or pull requests

2 participants