JavaScript: How to know if a connection with a shared worker is still alive?

This is only as reliable as beforeunload, but seems to work (tested in Firefox and Chrome). I definitely favour it over a polling solution. // Tell the SharedWorker we’re closing addEventListener( ‘beforeunload’, function() { port.postMessage( {command:’closing’} ); }); Then handle the cleanup of the port object in the SharedWorker. e.ports[0].onmessage = function( e ) { … Read more

use transition on ::-webkit-scrollbar?

It is fairly easy to achieve using Mari M’s background-color: inherit; technique in addition with -webkit-background-clip: text;. Live demo; https://jsfiddle.net/s10f04du/ @media screen and (-webkit-min-device-pixel-ratio:0) { .container { overflow-y: scroll; overflow-x: hidden; background-color: rgba(0,0,0,0); -webkit-background-clip: text; transition: background-color .8s; } .container:hover { background-color: rgba(0,0,0,0.18); } .container::-webkit-scrollbar-thumb { background-color: inherit; } }

CSS3 transforms and transitions (Webkit)

Add the vendor prefix in the transitions: p { -webkit-transform: translate(-100%, 0); -moz-transform: translate(-100%, 0); -ms-transform: translate(-100%, 0); -o-transform: translate(-100%, 0); transform: translate(-100%, 0); -webkit-transition: -webkit-transform 1s ease-in; /* Changed here */ -moz-transition: -moz-transform 1s ease-in; -o-transition: -o-transform 1s ease-in; transition: transform 1s ease-in; } a:hover + p { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); … Read more

Image scaling by CSS: is there a webkit alternative for -moz-crisp-edges?

WebKit now supports the CSS directive: image-rendering:-webkit-optimize-contrast; You can see it working in action using Chrome and the last image on this page: http://phrogz.net/tmp/canvas_image_zoom.html The rules used on that page are: .pixelated { image-rendering:optimizeSpeed; /* Legal fallback */ image-rendering:-moz-crisp-edges; /* Firefox */ image-rendering:-o-crisp-edges; /* Opera */ image-rendering:-webkit-optimize-contrast; /* Safari */ image-rendering:optimize-contrast; /* CSS3 Proposed */ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)