Hi Mike,

On Wed, Oct 1, 2008 at 4:02 AM, Mike Belshe <[EMAIL PROTECTED]> wrote:

> You should be able to use v8::Array for this; (see v8.h).
> Create your array:
>
>   v8::Local<v8::Array> array = v8::Array::New();
>   for (int index = 0; index < myStdStrings.length(); ++index)
>     array->Set(v8::Integer::New(index),
> v8::String::New(myStdStrings[index]));
>
> Now, I think you can wrap it:
>
> NPObject* myObj = NPN_CreateScriptObject(0, array, domwindow);
>
>
> Or am I misunderstanding?
>
> Mike
>

Thanks, that's exactly what I'm looking for :-)  Now I just need to put it
somewhere appropriate for access from webkit/glue, which brings me back to
my CreateSimpleArrayObject() idea.

It appears that the appropriate place to add the CreateSimpleArrayObject()
methods is in the JSBridge class in webkit/port/bridge.  JSBridge is then
extended by V8Bridge and KJSBridge.  Your above example provides the
implementation for V8Bridge.  Do you know what the equivalent code for KJS
would look like?

Regards,
Marshall

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to