--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a0e594e4-e3d8-43e1-9d16-995093c5bdbe%40chromium.org.
The direct answer to your question is - the method you are after is "ToV8" e.g.v8::Local<v8::Value> element_value = ToV8(element, context, isolate);But depending on what exactly you are trying to do there might be a different solution space which might be better.Thanks,IanOn Fri, Jun 15, 2018 at 1:09 PM Kirill <sle...@gmail.com> wrote:Hi.Here is the situation: I created a new HTML Element (with corresponding HTML tag for it), and now I need to have an ability to add/remove different methods and fields of its JS instance dynamically depending on object's attributes.I overloaded virtual ParseAttribute() call, so I can react to attributes' changing events:
void HTMLNewElement::ParseAttribute(const AttributeModificationParams& params) {So now I need to get an access to this object's V8 instance.As I can see in ScriptWrappable.h header, there is the Wrap() method to get V8 wrapper of the object:virtual v8::Local<v8::Object> Wrap(v8::Isolate*, v8::Local<v8::Object> creation_context);Everything is clear, except the 'creation_context' argument meaning.The element's attributes can be set during document parsing process or manually from some scripts.I can get current context with isolate ->GetCurrentContext();, but it will be v8::Context, not v8::Object.
So what exactly should I pass there?
--Thanks,Kirill.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a0e594e4-e3d8-43e1-9d16-995093c5bdbe%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJL3UpSEv3%2Bq1FyxowG%3DLm9Bn_NqX2%2BgY0SE1%2B6HbOvNhqSmzg%40mail.gmail.com.