Web APIs (navigator, geolocation, history)

Why will this code throw an error?
// Current URL: https://example.com/products

// Attempt to use pushState
try {
  history.pushState({page: 'details'}, 'Product Details', 'https://different-domain.com/details');
} catch (error) {
  console.error('History API error:', error);
  // Fallback to traditional navigation
  window.location.href = 'https://different-domain.com/details';
}
Next Question (16/40)