📜 ⬆️ ⬇️

New Opera 19 for developers

Catching up with the release of Opera 19 for Android last week, comes Opera 19 for Mac and Windows (based on Chromium 32). Next is what it means for developers.

Javascript promises


So-called promises are now available in JavaScript. Promises are a convenient way to access the results of operations in JavaScript, be they synchronous or asynchronous. The simplest example:

var promise = new Promise(function(resolve) {
	setTimeout(function() {
		resolve('The time machine worked!');
	}, 2014); // see what I did there?
});

promise.then(function(result) {
	console.log('Promise resolved.', result);
});

 ,  ,     .

  WebP


WebP    — GIF, .  Opera 19  WebP  .

2D Canvas


  Canvas    -,   . ,   getContext, alpha falsetrue).

var context = document.querySelector('canvas').getContext('2d', {
	'alpha': false
});


API


 Opera 19  API :


.     Opera 15+.

  , ,   Opera Developer,  .

 Opera 19.

')

Source: https://habr.com/ru/post/210588/


All Articles