yuntaozhu / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Missing cross-browser implementation of opt_title in setToken/replaceToken of history.Html5History #623

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
'''What steps will reproduce the problem?'''
1. historyInstance = new goog.history.Html5History();
2. historyInstance.setEnable(true);
3. historyInstance.setToken('entry1', 'Entry 1 title'); 
historyInstance.replaceToken('entry2', 'Entry 2 title');
4. while browser URI is changed according to the token, document.title stays 
unchanged.

'''What is the expected output? What do you see instead?'''
Expect to see document.title changed if opt_title param is provided in 
setToken/replaceToken under goog.history.Html5History constructor.

'''What version of the product are you using? On what operating system?'''
commit 74667f60a487ea7a596789e2d9f48f26ff29569c, Mac OS X 10.9.1

'''Please provide any additional information below.'''
According to the official product description, Closure Library is a 
cross-browser JavaScript library. Therefore, it would be reasonable to provide 
cross-browser implementation of the title associated with the history entry. 

For browsers that doesn't support it, the solution would be to set 
document.title manually in goog.events.EventType.POPSTATE event callback.

Original issue reported on code.google.com by sumeiko....@gmail.com on 20 Jan 2014 at 10:36