robpaveza / jsrt-dotnet Goto Github PK
View Code? Open in Web Editor NEWA C# implementation of the JsRT wrapper, similar to the WinRT API, but designed for .NET desktop applications.
License: MIT License
A C# implementation of the JsRT wrapper, similar to the WinRT API, but designed for .NET desktop applications.
License: MIT License
How would one use c# async features to simulate js-style callbacks? (see: node.js fs API )
Imagine I have the following C# method:
async Task<string> ReadFileAsync(string path)
{
return await DoWhatever(path);
}
How would I register a js function which takes a string and a callback as arguments and calls it asynchronously?
I pulled the source (master), and tried a rebuild, no joy, I expect I need to tweak something, at least to point to the version of Chakra I already built, I notice there are no System references in the Microsoft.Scripting project, should I be adding them by hand?
Here is a sampling of the errors I get
Severity Code Description Project File Line Source Suppression State
Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) Microsoft.Scripting C:\Users\aphilpotts\AppData\Local\Temp.NETPortable,Version=v5.0.AssemblyAttributes.cs 2 IntelliSense Active
Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) Microsoft.Scripting C:\Users\aphilpotts\AppData\Local\Temp.NETPortable,Version=v5.0.AssemblyAttributes.cs 3 IntelliSense Active
Error CS0400 The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?) Microsoft.Scripting C:\Users\aphilpotts\AppData\Local\Temp.NETPortable,Version=v5.0.AssemblyAttributes.cs 4 IntelliSense Active
Error CS0518 Predefined type 'System.String' is not defined or imported Microsoft.Scripting C:\Users\aphilpotts\AppData\Local\Temp.NETPortable,Version=v5.0.AssemblyAttributes.cs 4 IntelliSense Active
Dear Rob
it would be very nice to see, which branch including but not limited to HostObjectBridgeV2.1, HostObjectBridgeV2 and master has which production status. As there is apparently no more work in progress, I'd like to think that all branches are final. But: which branch is the recommended one to use, or are there newer, alternative .net bindings for ChakraCore so that you stoped working on this project?
May I kindly ask you, to provide some guidance in the respective readme.md_s? That would be very helpful.
Martin
Hi,
im working on chakracore. i wanna use external javascript library like underscore.js, math.js etc.
How can i do it?
Example:
var underscore = ReadFromFile(underscore.js); var fn = engine.EvaluateScriptText(underscore); var fn = engine.EvaluateScriptText(@"var numberList = [1,2,4,20,80,12,42];" "var result = _.shuffle(numberList);" "result[0];");
_.shuffle is an underscore.js function.
Can this be done through jsrt-dotnet?
http://stackoverflow.com/questions/35390441/embedding-chakrahost-c-for-webgl-example
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 CS1061 “Type”未包含“IsValueType”的定义,并且找不到可接受第一个“Type”类型参数的可访问扩展方法“IsValueType”(是否缺少 using 指令或程序集引用?) Microsoft.Scripting C:\Users\Liuzhenhua\Source\Repos\jsrt-dotnet\src\Microsoft.Scripting\JavaScript\JavaScriptConverter.cs 255 活动
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.