HichemBenChaaben / headjs

The only script in your HEAD.

Home Page:http://headjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Head JS

This project was never announced. git push and it was all viral.

The website: http://headjs.com

v0.97a / 2012-10-20

Report a Bug.

0.97a

  • Updated QUnit & got unit tests running again
  • Swictched to "use strict"
  • Fixed up some variable usages
  • Added browser detections other than just for ie-lt
  • updated browser regexes (firefox, safari, opera, ios, android, webkit)
  • detect if browser is: desktop, mobile, touch enabled
  • detect portrait/landscape mode
  • html5 shim now only triggers on ie-lt9
  • added a throttle to onResize, since some browsers fire tons of events/sec
  • added corrected height/width measurements, but only exposed via new object: head.screen
    • contains height/width, innerHeight/innerWidth, outerHeight/outerWidth
  • forced all css router names to lowercase just in case ppl type in url's with wierd casings

Future

  • In the immediate future i would like to patch up things that have been sitting on hold, and make sure that people already using HeadJS, can continue to use it without any breaking changes.
  • After that however things will likely change a bit
  • Have a peek here HeadJS@I-Technology
  • For example :
    • Programatically it's very awkward to use the current syntax of prefixing things with no-. Instead they should be suffixed with -true/-false. Like this it is very easy to generate variables on the fly and have them match your HeadJS rules.
    • Currently screen detection is based on the outerWidth of the navigator window, so once you add tabs, scrollbars, sidebars, & toolbars ..you are probably in for a big surprise with your design! Therefore generated classes should instead reflect the actual screen estate availiable: innerWidth/innerHeight
    • Right now you only get classes based on width lt, but what about lte, gt, and gte ? Not to mention height ! :)

Rebooting HeadJS,

This project was sitting idle for the last year or so, but me Robert Hoffmann and Paul Irish have just gotten the green light from Tipiirai to try and keep the project alive a bit more :)

There will be a few questions to work out, but i think that HeadJS still solves the basic problems that many users are experiencing. Especially in the Enterprise, where we must support obsolete browsers while moving forward with our time.

  1. Feature detection
  1. Script loading
  2. Responsive design
    • HeadJS handles this very well through css classes
    • But there are other solutions like Respond.JS that work well too.
  3. Browser detection
  4. Plug browser quirks

Since points 1 & 2 seem pretty well covered, going forward we will need to decide if these functionalities should be removed or not from HeadJS, so we can concentrate on the points that HeadJS excels in: 3, 4, & 5

If you're like me, and need to support browsers like IE6+, FF2+, and think head.js does a great job emulating responsive design, while letting you plug the odd bugs and quirks of your least favorite browsers...

then stay tuned :)

About

The only script in your HEAD.

http://headjs.com