G
Garrett Smith
http://developer.apple.com/safaridemos/
Click through to "View Demo" and you'll likely see the error message:
| This demo was designed with the latest web standards supported by
| Safari.
Can you believe this shit? Unfuckingbelievable. Where are the guys who
had the idea to carry this out, so I can personally shake their hands?
The ironic thing here is that they are determining support in a pretty
non-HTML 5 way.
The pertinent lines are in browsercheck.js:
| if(this.isSafari4()){
| window.open(element.href,'demo',
|
'directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,height='
| + this.options.height + ',width=' + this.options.width);
| } else {
| if(this.overlay){
| this.overlay.appear({ duration: .3 });
| }
| }
and
| isSafari4: function(){
| if(this._isSafari4 === undefined) {
| if (!AC.Detector.isWebKit()) {
| this._isSafari4 = false;
| } else {
| var ua = navigator.userAgent.toLowerCase();
| var version =
| parseInt(parseFloat(ua.substring(ua.lastIndexOf('safari/') + 7)), 10);
| this._isSafari4 = (version >= 528);
| }
| }
| return this._isSafari4;
| }
It is parsing the userAgent string to determine if the browser is
Safari. It's like MSND demos only worse because where with MSDN demos,
many of those features were proprietary innovations of Microsoft,
Safari's demos are of standard HTML 5 features.
The HTML 5 specification of navigator.userAgent states:
http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-navigator-useragent
| userAgent
|
| Must return the string used for the value of the "User-Agent" header
| in HTTP requests, or the empty string if no such header is ever sent.
Garrett
Click through to "View Demo" and you'll likely see the error message:
| This demo was designed with the latest web standards supported by
| Safari.
Can you believe this shit? Unfuckingbelievable. Where are the guys who
had the idea to carry this out, so I can personally shake their hands?
The ironic thing here is that they are determining support in a pretty
non-HTML 5 way.
The pertinent lines are in browsercheck.js:
| if(this.isSafari4()){
| window.open(element.href,'demo',
|
'directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,height='
| + this.options.height + ',width=' + this.options.width);
| } else {
| if(this.overlay){
| this.overlay.appear({ duration: .3 });
| }
| }
and
| isSafari4: function(){
| if(this._isSafari4 === undefined) {
| if (!AC.Detector.isWebKit()) {
| this._isSafari4 = false;
| } else {
| var ua = navigator.userAgent.toLowerCase();
| var version =
| parseInt(parseFloat(ua.substring(ua.lastIndexOf('safari/') + 7)), 10);
| this._isSafari4 = (version >= 528);
| }
| }
| return this._isSafari4;
| }
It is parsing the userAgent string to determine if the browser is
Safari. It's like MSND demos only worse because where with MSDN demos,
many of those features were proprietary innovations of Microsoft,
Safari's demos are of standard HTML 5 features.
The HTML 5 specification of navigator.userAgent states:
http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-navigator-useragent
| userAgent
|
| Must return the string used for the value of the "User-Agent" header
| in HTTP requests, or the empty string if no such header is ever sent.
Garrett