Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #31758, comment 16


Ignore:
Timestamp:
03/29/2015 06:50:39 PM (9 years ago)
Author:
AITpro
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31758, comment 16

    v1 v2  
    1 Dumb
    2 
    3 hmm maybe this is the better approach. Looking around I get the overall feeling that pushState() is better/superior to use/more advantageous vs replaceState() and + location.hash would not be necessary.
    4 
    5 https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#The_pushState()_method
    6 
    7 
    8 {{{
    9 if ( window.history.pushState ) {
    10                        
    11 window.history.pushState( null, null, document.getElementById( 'wp-admin-canonical' ).href );
    12                        
    13 }
    14 }}}
     1Invalid disregard/deleted.