Guide To Html5 Web Development
Below given information will help HTML5 developers to know about the web browsers that support HTML5 Web Workers
. You will also get to know about things like non-accessible elements, debugging and error handling.
Browser support in HTML5 web development field
Web workers have recently entered into the IE10 Platform Preview. This supports Safari (since 4.0), Chrome, Firefox (since 3.6) & Opera 11. Note that this does not support the mobile version of the respective browsers. Feature detection mechanism can be used to know whether a particular feature will be supported in your code or not. There are two viable soluons to help you out. The first one is to make use of very simple code, which will help you in testing:
/* Checking if Web Workers are supported by the browser */
if (window.Worker) {
// Code using the Web Workers
}
And the second one is to go for the renowned Modernizr library (these days it is shipped with ASP.NET MVC3 project templates). The following HTML5 web development code will be used here:
var divWebWorker = document.getElementById("webWorkers");
if (Modernizr.webworkers) {
divWebWorker.innerHTML = "Web Workers ARE supported";
}
else {
divWebWorker.innerHTML = "Web Workers ARE NOT supported";
}
This will help HTML5 developers in exposing two versions of your application. Even if Web Workers arent supported inside your browser, simply execute your java scrip in usual manner. In case your browser supports Web Workers, you will be able to augment the performance of your application by pushing JavaScript codes in it.
Error Handling & Debugging in HTML5 web development
It is extremely easy to take care of the errors that come from your Web Workers. Simply subscribe to the OnError event by following the below given code:
myWorker.addEventListener("error", function (event) {
_output.textContent = event.data;
}, false);
Solving Mimic console.log() issue
It is important for the developers to know console objects can not be found within a worker. You can monitor the console.log() behavious by making use of MessageChannel: console.log() for Web Workers. This will work perfectly with Opera, Chrome and IE10. But for firefox you need to change this line of code:
console.log.apply(console, args); // Pass the args to the real log
By this one:
console.log(args); // Pass the args to the real log
by: jakson
Selling Cars On Finance Increase Your Exposure With A Strong Web Presence Benefits Of Outsourcing Web Design Services To India How To Hiring Web Designer From Professional Web Design Company Seek Help From The Web Application Development Company How Can You Go A Long Way With Quality Web Design Procedures Followed By Web Design Hobart What To Look For In A Web Hosting Services Provider Infinitevizionz Well Established Web Design Company In London Importance Of Web Design Oakville Get Fruitful Results In Php Web Development Fee-less Or Otherwise Paid Web Hosting: Make Out A Choice Advice In Choosing A Web Hosting Provider Made For On-line Trade Ways To Access The Greatest Domain Hosting Program For Your Web Page Painlessly
www.yloan.com
guest:
register
|
login
|
search
IP(216.73.216.125) California / Anaheim
Processed in 0.016454 second(s), 7 queries
,
Gzip enabled
, discuz 5.5 through PHP 8.3.9 ,
debug code: 52 , 2594, 79,