Category Archives: Uncategorized

JavaScript destructuring with rename not logical?

To destructure a member variable from an object and rename it at the same time, the code looks like: const { property: myprop } = { property: ‘hello’ } Now that to me is back to front.  I would think … Continue reading

Posted in JavaScript, Uncategorized | Tagged | Leave a comment

Chrome: How to step into code not available in debugger?

It’s been a while, but I am back! Came across a situation today where I wanted to step through some javascript code that had been installed by a third party (in this case, a puppeteer script) so there was no … Continue reading

Posted in Chrome, debugging, JavaScript, Uncategorized | Leave a comment

Idea: Low Emission Zones & Engine Control Units

The idea is that a car’s ECU would know (triggered by GPS or NFC communication) when it is in a low emission zone and to automatically alter its driving parameters to reduce emissions while within the low emission zone.

Posted in Driving, Emissions, Uncategorized | Leave a comment

Find what is setting a global variable in javascript

Having identified an unknown global variable in your JavaScript application, how should you go about finding what is setting it? Well one way is to watch for the variable being set as follows.  In this example, I look for something … Continue reading

Posted in Uncategorized | Leave a comment

iOS Safari correct viewport size

In our html5 application on iOS, in particular when running as a home screen icon, there was an annoying extra 20px of space at the bottom of the window that allowed the content to be scrolled up underneath the status … Continue reading

Posted in Uncategorized | Leave a comment

HOWTO: Generate a javascript stack trace

(new Error(‘oops’)).stack

Posted in Uncategorized | Leave a comment

showModalDialog replacement

Ok, so this is not a drop-in replacement for showModalDialog, because it does not block javascript, and does require some code changes.  I wrote it to demonstrate that we don’t really need showModalDialog, we can achieve the use case (prevent interaction … Continue reading

Posted in Uncategorized | 4 Comments