Giter Club home page Giter Club logo

jsbridge's People

Contributors

deltakosh avatar kozw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsbridge's Issues

Giving exception when using debug mode has Managed only or using Release mode

I have added CharkraBridge.winmd from dist folder of your project as a reference in my project to use ChakraHost API, but I am facing getting exception when debug mode is Managed only. Even I change to Release as build configuration, it gives me following exception

Exception thrown: 'System.Exception' in ChakraBridge.winmd failed to start debugging.

Please suggest how to solve the issue?

Multiple sendToHost functions

Hi,

This library is really great but there is some questions we don't have answers. One of them is how to handle multiple sendToHost functions in the same js file, like here :

var retrieveSuggestions = function (word: string, dictionary: string) {
    var suggestions = apiService.autocomplete(word, dictionary);
    sendToHost(JSON.stringify(suggestions), "Suggestion[]");
}

var executeSearch = function (word: string, dictionary: string) {
    var translationResult = apiService.translate(word, dictionary);
    sendToHost(JSON.stringify(translationResult), "TranslationResult");
}

How to know if I call the autocomplete or the translate function ?

Not working in real application but working in test

I observe rather weird behavior. I created a 'Class Library (Universal Windows)' project, put all logic related to ChakraBridge usage there, then created a 'Unit Test App (Universal Windows)' project and polished the functionality. Everything was good up until this point. Then I finally wanted to use the fore-mentioned Class Library in a real 'Blank App (Universal Windows)' project and here I run into a serious issue. An exception without meaningful message is always thrown at ChakraBridge engine's call to _Engine.RunScript(. Is there anything I need to set in the Package Manifest or do something else to allow using ChakraBridge in a real universal application?

Can't execute http request

I tried to make an HTTP call using XmlHttpRequest object but I receive an error each time I try to send the request. Here is the error :

capture

Implementing multiple interfaces only exposes the 1st interface on Javascript

Hi,

Not sure if this is an issue, or there is a different way of doing this. We have an existing class that implements from a Base Class, which we also want to implement interface that will be used in Javascript.

For example, the ff:

`public class Foo : BaseFoo, IFoo
{
public string BaseName { get;set; }
public string GenericName { get;set; }
public string FooName { get; set; }
}

public class BaseFoo : IBaseFoo, IGenericFoo
{
public string BaseName { get; set; }
public string GenericName { get; set; }
}

public interface IFoo
{
string FooName { get; set; }
}`

When we use Foo in Javascript, we can only use BaseName and not GenericName and FooName. If we switch IGenericFoo and IBaseFoo order, we can use GenericName but not BaseName and FooName. Basically, whatever is the first interface is the only one exposed.

Is this supported? Or is there a different way of implementing what we want to do?

Thank you

反馈:ChakraHost 在多实例下有重大bug

设置当前上下文的代码:Native.JsSetCurrentContext(context),是在构造函数里完成的。
这是否意味着,有多个实例时,其实上下文就以最后一个实例为准了???

需求:ChakraHost.CallFunction 需要有返回值支持!!!

需求:ChakraHost.CallFunction 需要有返回值支持!!!
我目前有一个项目。需要有这样的支持。像下面这样:
public string callJs(SdSource source, string fun, params object[] args)
{
try
{
return engine.CallFunction(fun, args.ToArray());
}
catch (Exception ex) {
Util.log(source, "JsEngine.callJs:" + fun, ex.Message, ex);
return null;
}
}

getContext("experimental-webgl") fails

var ctx = document.createElement('canvas').getContext('experimental-webgl');

What needs to be done to make that works?

    `public object getContext(string contextType)
    {
        if (contextType == "2d") {
            if (this.context == null) {
                this.context = new CanvasRenderingContext2D(this.window, this);
            }
            return this.context;
        }
       else if (contextType == "experimental-webgl")
        {
            if (this.context == null)
            {
                this.context = new CanvasRenderingContext2D(this.window, this);
            }
            return this.context;
        }
        return null;
    }`

What is the project state?

I'm trying to understand the project state to decide if it is a good idea to start using it. How active the project development is? What are the plans for the new features? In general it looks very promising but I already have some suggestions. CallFunction method, for example, is void method. It would be good if it returned an object which is returned by the javascrip method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.