The idea is to create a library that will use feature/device detection to change the links.
The way i see this working is by using objects:
-
Main routing table var router = { group : routing table group : routing table };
-
var group = iphone ={ //rules for group detection webkit : true canvas : true }
-
routingTable var routingTable = { link now : link later }
-
defaultRouting = do nothing
dependency - modernizr
- What will cause each to go where: iphone app:
- device is iphone
- app is installed
- routes go from there
html5 app
- device supports js
- device supports local storage
regular theme
- device has no js support
- no routing spec in any other groups