mirror of
https://github.com/lexmount/moli.git
synced 2026-11-22 08:02:23 +00:00
fix(navigation): expose native NavigationDestination bindings
This commit is contained in:
@@ -7,8 +7,8 @@ use crate::context_bootstrap::history_mutation::document_can_have_url_rewritten;
|
||||
use crate::context_bootstrap::location_runtime::location_href_slot;
|
||||
use crate::context_bootstrap::navigation_activation::{NAVIGATE_EVENT_PRECOMMIT_TRANSITION_RESOLVER_SLOT, install_navigation_transition};
|
||||
use crate::context_bootstrap::navigation_events::{
|
||||
NAVIGATE_EVENT_PRECOMMIT_CONTROLLER_SLOT, navigation_destination_url_value, navigation_scroll_event_is_active,
|
||||
set_navigation_destination_url,
|
||||
NAVIGATE_EVENT_PRECOMMIT_CONTROLLER_SLOT, navigation_destination_url_value,
|
||||
navigation_scroll_event_is_active, set_navigation_destination_url,
|
||||
};
|
||||
use crate::context_bootstrap::navigation_handler_callbacks::{
|
||||
NAVIGATE_EVENT_ADDED_HANDLERS_SLOT, NAVIGATE_EVENT_DEFERRED_HANDLERS_SLOT,
|
||||
|
||||
@@ -909,10 +909,8 @@ pub(super) fn navigation_precommit_redirect<'s>(
|
||||
let destination = event
|
||||
.get(scope, v8str(scope, "destination").into())
|
||||
.and_then(|value| v8::Local::<v8::Object>::try_from(value).ok());
|
||||
let url = destination
|
||||
.and_then(|destination| destination.get(scope, v8str(scope, "url").into()))
|
||||
.and_then(|value| value.to_string(scope))
|
||||
.map(|value| value.to_rust_string_lossy(scope));
|
||||
let url =
|
||||
destination.and_then(|destination| navigation_destination_url_value(scope, destination));
|
||||
let history = navigate_event_private_value(scope, event, NAVIGATE_EVENT_REDIRECT_HISTORY_SLOT)
|
||||
.and_then(|value| value.to_string(scope))
|
||||
.map(|value| value.to_rust_string_lossy(scope))
|
||||
|
||||
Reference in New Issue
Block a user