Category: Programming

Plant UML

Software designers sometimes need to present UML sequence diagrams like this one. This kind of thing is absurdly fiddly to draw with most graphics packages. But there’s a language called PlantUML that allows us to write them as text and render them in various software tools, including WordPress with the plugin called PlantUML Renderer. The text for this example is… Read more →

Which iframe posted a message to my window?

What do you do if you have a bunch of different iframes in your web page posting messages? How do you know which iframe a message came from? Even if the iframe document comes from a different origin? This does the trick window.addEventListener (“message”, function (event) { /* for security, always check the origin */ if (event.origin === ‘https://www.example.com’) {… Read more →