Example #1
0
v8::Handle<v8::Value> V8Location::assignCallback(const v8::Arguments& args)
{
    Location* impl = V8Location::toNative(args.Holder());
    BindingState* state = BindingState::instance();

    // FIXME: Handle exceptions correctly.
    String urlString = toWebCoreString(args[0]);

    impl->assign(urlString, activeDOMWindow(state), firstDOMWindow(state));
    return v8::Undefined();
}
v8::Handle<v8::Value> V8Location::assignCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.Location.assign");
    Location* impl = V8Location::toNative(args.Holder());
    State<V8Binding>* state = V8BindingState::Only();

    // FIXME: Handle exceptions correctly.
    String urlString = toWebCoreString(args[0]);

    impl->assign(urlString, state->activeWindow(), state->firstWindow());
    return v8::Undefined();
}