turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 428 forks source link

Add setRootSelector() to replace optional element instead of body #583

Closed mizchi closed 8 years ago

mizchi commented 9 years ago

Add setRootSelector(selector).

I tried to swap optional element instead of document.body but Turbolinks can't stop body swap without this patch.

It makes implementing universal header easily but it's a just idea of my use. Please close as you like if maintainer doesn't need.

Thibaut commented 8 years ago

Thanks for the PR.

With the addition of data-turbolinks-permanent in Turbolinks 3 I'm not convinced there's a need for scoping Turbolinks on a certain element other than the <body>.

Happy to reconsider if there's a use-case I didn't think of.