thlorenz / browserify-shim

📩 Makes CommonJS incompatible files browserifyable.
MIT License
933 stars 87 forks source link

Implementing History.js with browserify #159

Closed melbourne2991 closed 9 years ago

melbourne2991 commented 9 years ago

I am trying to implement history.js which is in itself a shim/wrapper for older browsers.

It's dependencies are as follows

(function(window,undefined){ "use strict";

// --------------------------------------------------------------------------
// Initialise

// Localise Globals
var
    console = window.console||undefined, // Prevent a JSLint complain
    document = window.document, // Make sure we are using the correct document
    navigator = window.navigator, // Make sure we are using the correct navigator
    amplify = window.amplify||false, // Amplify.js
    setTimeout = window.setTimeout,
    clearTimeout = window.clearTimeout,
    setInterval = window.setInterval,
    clearInterval = window.clearInterval,
    JSON = window.JSON,
    alert = window.alert,
    History = window.History = window.History||{}, // Public History Object
    history = window.history; // Old History Object

How can I integrate it properly and then use window.History as per normal?

bendrucker commented 9 years ago

Please share what you've tried thus far and what's not working

neurosnap commented 9 years ago

https://github.com/Raynos/html5-history

Does all the work for you, but just as a warning, html4 support is disabled by default.

thlorenz commented 9 years ago

@neurosnap that's a great alternative, however doesn't answer the question regarding shimming history.js. @melbourne2991 any news on a sample project?

Let us know if you lost interest possibly due to the presented alternative so we can close this issue. Otherwise please provide us with a way to reproduce your problem in a separate github project.

melbourne2991 commented 9 years ago

@thlorenz Lost interest for other reasons, can close this @thlorenz cheers