views:

28

answers:

2

Using YUI scripts on our SSL page turned out to break the SSL connection because they dynamically load scripts from yahoo (combo) over a http connection.

As we only use the history manager of YUI 3, I wanted to host the code on our server. If I copy the code from http://yui.yahooapis.com/combo?3.2.0/build/yui/yui-min.js&3.2.0/build/oop/oop-min.js&3.2.0/build/dom/dom-base-min.js&3.2.0/build/dom/selector-native-min.js&3.2.0/build/dom/selector-css2-min.js&3.2.0/build/event-custom/event-custom-min.js&3.2.0/build/event/event-base-min.js&3.2.0/build/node/node-base-min.js&3.2.0/build/event/event-synthetic-min.js&3.2.0/build/json/json-min.js&3.2.0/build/history/history-min.js&3.2.0/build/history/history-hash-ie-min.js It does not work anymore ("Y.History.getBookmarkedState is not a function" says firebug).

Does anyone know how to do that correctly?

Thanks

A: 

I gues you show check the API. I've checked the code from this combo and it really loads History and submidules.

YUI({ bootstrap: false }).use('history', function(Y) {
    Y.log(Y.History);
});

It shows outputs G(); Also I found getBookmarkedState declaration inside history-deprecated submodule so it seems like something new is used instead of this.

fantactuka
A: 

You're loading the modules correctly, but you're trying to use the deprecated History API (from YUI <=3.1.x). In YUI 3.2.0, the History Utility was rewritten, and the API is not backwards-compatible.

You can still use the old API in 3.2.0 by loading the history-deprecated module instead of history. Alternatively (and preferably) you can migrate to the new API, which is simpler and more flexible than the old one. You'll find a migration guide in the History Utility documentation.

Ryan Grove