Coder Social home page Coder Social logo

gajavascript's People

Contributors

newyankeecodeshop 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gajavascript's Issues

Readme.MD is outdated

Hey, I was reading through your readme and I think some of the documentation is outdated. For ex.

id document = [scriptEngine documentObject];

Shouldn't this be

id document = [webView documentJS];

Also you state:
Now you can access the "document" or "window" object via the GAScriptEngine instance, or create your own objects using [GAScriptEngine newScriptObject:].

Am I missing something here, I don't see any properties document or window in the GAScriptEngine interface?

thanks for any help

Block callbacks not invoked

Block callbacks were not being invoked when passed in via [GAScriptObject callFunction:withArguments:]. The block objects were not being added to the script engine instance.

Basic to integrate

Hello,
I need basic help to integrate your library with HighCharts. I'm Objective C developer and write native iOS apps. But recently have got a project where i need to display highly graphical and animated charts. I've choosen HighCharts & amCharts for this purpose but none of them can be used in my native iOS application. But your framework seems good to bridge the gap. How can I use HighCharts and your Javascript framework with my native code without having backend server? Please help. (A simple example will be great)

BR,
~newbie to Javascript & Web development.

Need to add "--all_load & --ObjC" linker flags

I was banging my head on the wall trying to get this to work and then duh - I totally forgot about using static libs and using the --all_load and --ObjC linker flags. Might want to add something about that on the readme.md. Thanks for your work in this project!

How can I loop through DOM elements?

Hi there,

This looks to be a great framework which I am trying to use to is max!

I have the following code to grab my document from my UIWebView and a subset of all the div elements:

id document = [webView documentJS];
id myElement = [document getElementsByClassName:@"div"];

myElement is of the type GAScriptObject (as expected), but how can I get information about the innerHTML of each div? Or more specifically, filter by an attribute?

Ideally, I am trying to get a reference to an element which does not have an id or a name (but I know it's text and a few other attributes).

Any advice would be super awesome. I'm stuck here.

Cheers,
Brett

Weird issue with GAJavascript.performSelector JS

So I have narrowed down the issue I am having to trying to communicate from JS back to objC via GAJavascript.performSelector.

If you take a look at a sample project I created, there is one line that in boxes.html that does a console.log, if I remove that line of code it will perform as desired (appends a h1 to all the webviews that says "I LOVE HTML"), otherwise the h1 is never appended.

I have worked around this problem for the time being by changing line 152 of ga-js-runtime.js to the following:

window.setTimeout(function() { location.replace("ga-js:makeLotsaCalls");  }, 500);

Not exactly sure why this is causing an issue in my scenario, any ideas?

Sample Project

Block callback args corrupted when arrays are passed

Given some javascript that takes a callback function with three arguments, the second of which is an array:

function someCoolFunction (obj) {

    /* ... */

    obj.callback('First arg', [1, 2, 3], 'third arg');
}

Using GAJavaScript to call "someCoolFunction":

GAScriptEngine* scriptEngine = [self scriptEngine];

GAScriptObject* obj = [scriptEngine newScriptObject];
[obj setFunctionForKey:@"callback" withBlock:^(NSArray* arguments) 
{
    assert([arguments count] == 3);     // fails
}];

[scriptEngine callFunction:@"someCoolFunction" withObject:obj];

The number of arguments is actually 5. The middle array is flattened out into the entire argument list.

Multiple UIWebView / GAScriptEngine & Caching Issues

I am working on a project which has 7-9 UIWebViews each with their own GAScriptEngine. I was having a problem where only the last rendered one would work properly. It turns out that if I didn't use a proper caching policy with my NSURLRequest it would work this way. Not sure what a good workaround is but FYI.

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.