News for hackers. Stuff that matters.

codepsycho

Re:Icons – Google Fonts on Wednesday March 03, 2021 @06:18AM (#26326994)
AFAIK it hasn't "added support". We've used material icons for a year or two now from Google Fonts. Good to see this getting adoption but it's been available for some time
Re:WebComponent libraries lit-HTML and litElement released on Tuesday February 05, 2019 @03:47PM (#19089664)
We have used Polymer (1, 2 & 3), lit-html and LitElement on large production websites for some time now.

Following the progression was a rocky road at times but it really does now provide a very lean base to build from. I rarely find the need to use a framework or some such library anymore unless for consistency within existing projects.

Reuseable components really are easy now and really are reuseable. It'll be very interesting to see where this project goes...

This is because:

> [] + {}

Becomes:

> [].toString() + {}.toString()

Empty array to a string is "" (empty string). Object to string is "[object Object]".

> {} + []

Becomes:

> +[]

The prefix turns the array into a number, same as Number([]). This seems to be because {} is interpreted as a code block, not an object, due to it being the first thing.

Put it in parentheses and it'll do toString like before.