JavaScript print Events / / No Comments Media queries provide a great way to programmatically change behavior depending on viewing state. We can target styles to device, pixel ratio, screen size, and even print. That said, it’s also nice to have JavaScript events that also allow us to change behavior. Did you know you’re provided events both before and after printing? I’ve always used @media print in stylesheets to control print display, but JavaScript provides beforeprint and afterprint events: function toggleImages(hide = false) { document.querySelectorAll('img').forEach(img ={ img.style.display = hide ? 'none' : ''; }); } // Hide images to save toner/ink during printing window.addEventListener('beforeprint',... more → Posted in: JavaScript Tagged with: events, JavaScript, print
Monitor Events and Function Calls via Console / / No Comments Despite having worked on the very complex Firefox for a number of years, I’ll always love plain old console.log debugging. Logging can provide an audit trail as events happen and text you can share with others. Did you know that chrome provides monitorEvents and monitor so that you can get a log each time an event occurs or function is called? Monitor Events Pass an element and a series of events to monitorEvents to get a console log when the event happens: // Monitor any clicks within the window monitorEvents(window, 'click') // Monitor for keyup and keydown events on the body monitorEvents(document.body, ['keyup', 'keydown']) You can pass an array of events to listen for multiple... more → Posted in: JavaScript Tagged with: Calls, Console, events, Function, Monitor
Google Maps begins letting users create public events – The Verge / / No Comments Google Maps begins letting users create public events The Verge Google Maps’ first try at AR navigation is janky but exciting The Next Web Google Maps is making it easier for us to spot public events, here’s how Times of India Here is How to Set Google Maps Event PhoneWorld Magazine View full coverage on Google News “map app” – Google News… more → Posted in: Interactive Maps Tagged with: begins, create, events, Google, letting, maps, public, Users, Verge
How to add your calendar events to the Google Maps app – CNET / / No Comments CNET How to add your calendar events to the Google Maps appCNETLate last week, Google announced a closer integration between two of its very popular services, Maps and Calendar. Events added to your Google Calendar — either manually or automatically via Gmail — will be viewable in Google Maps for quick access to …Apple Maps in iOS 10: REVIEW – Business InsiderBusiness InsiderGoogle Maps Just Got Even More Useful | TrendinTechTrendintech (press release)all 5 news articles » map app – Google News… more → Posted in: Interactive Maps Tagged with: calendar, CNET, events, Google, maps