JavaScript waitForever

Writing mochitests for new features in DevTools can be difficult and time-consuming.  There are so many elements interacting in an async manner that I oftentimes find myself using the debugger to debug the debugger!  In the case where it’s unclear what interaction isn’t working properly, I find myself going to a neat utility function: waitForever.  […]
The post JavaScript waitForever appeared first on David Walsh Blog.

Link: https://davidwalsh.name/javascript-wait

Google Labs Web Components

I think it’s kinda cool to see Google dropping repos of interesting web components. It demonstrates the possibilities of cool new web features and allows them to ship them in a way that’s compatible with entirely web standards.
Here’s one:
I wanted to give it a try, so I linked up their example two-up-min.js script in a Pen and used the element by itself to see how it works. They expose the component’s styling with custom properties, which I’d …
The post Google Labs Web Components appeared first on CSS-Tricks.

Link: https://css-tricks.com/google-labs-web-components/

An Introduction and Guide to the CSS Object Model (CSSOM)

If you’ve been writing JavaScript for some time now, it’s almost certain you’ve written some scripts dealing with the Document Object Model (DOM). DOM scripting takes advantage of the fact that a web page opens up a set of APIs (or interfaces) so you can manipulate and otherwise deal with elements on a page.
But there’s another object model you might want to become more familiar with: The CSS Object Model (CSSOM). Likely you’ve already used it but didn’t necessarily …
The post An Introduction and Guide to the CSS Object Model (CSSOM) appeared first on CSS-Tricks.

Link: https://css-tricks.com/an-introduction-and-guide-to-the-css-object-model-cssom/