Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: template Clear Filter

<template>: The Content Template element

The <template> HTML element serves as a mechanism for holding HTML fragments, which can either be used later via JavaScript or generated immediately into shadow DOM. This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨November 2015⁩. Attributes This element includes the global attributes. shadowrootmode Creates a shadow root for the parent element. It is a declarative version of the Element.attachShadow() method and ac

I couldn’t find an ideal pet app, so I used Notion instead

Edgar Cervantes / Android Authority A lot of things have been falling by the wayside as I deal with work and life, including my chores, plans to make scheduled appointments, and other general tasks I need to complete in my daily life. I even nearly lost my phone number of 20 years. But as my garden turns to shambles and that cupboard remains unsorted and overflowing, one thing that I don’t want to compromise on is my pets’ health. I have two cats that I absolutely adore, so when I overestimate

Show HN: JavaScript-free (X)HTML Includes

This is a simple example of using browsers' built in XSL support to build a website with common theming across all pages without any server-side code, static website generators, or Javascript. See the demo site How it works When you browse to index.xml (or any of the other XML files), the browser loads the template file given at the top of the XML. This template file describes how to render the various custom tags in the XML as HTML.

Superfunctions: A universal solution against sync/async fragmentation in Python

This library is designed to solve one of the most important problems in python programming - dividing all written code into 2 camps: sync and async. We get rid of code duplication by using templates. Table of contents Quick start Install it: pip install transfunctions And use: from asyncio import run from transfunctions import ( transfunction , sync_context , async_context , generator_context , ) @ transfunction def template (): print ( 'so, ' , end = '' ) with sync_context : print ( "it's

What should a native DOM templating API look like?

If you read my previous post, The time is right for a DOM templating API, you might be wondering what such an API would look like. Let's dive into that question now. What are we building? First, let's clarify what we're trying to design here, because when people hear the abstract template API idea described, before there's a concrete proposal or examples, they can sometimes think of very different things. In webcomponents/1069 I propose that we add a "declarative JavaScript templating API"

The time is right for a DOM templating API

TL;DR: I want to propose adding a declarative templating API to the web platform. Here's why... The web platform is the most successful application runtime of all time. While the largest reason for this is the web's reach, it wouldn't be possible without the DOM API, which turns a mostly static document viewer into a highly dynamic and expressive runtime. For as much hate as the DOM sometimes receives (some of that deserved, but some really not!) the DOM is undeniably a very powerful API. This

I wrote my PhD Thesis in Typst

I wrote my PhD Thesis in Typst I recently submitted my PhD thesis, and while waiting for the physical copies to get printed I thought I'd write about something you (hopefully) wouldn't notice when reading it. I wrote it in Typst, not LaTeX. In this post I will talk a bit about what went well and what didn't. Typst (https://typst.app/) is a modern take on a typesetting language that I think has a real shot at dethroning LaTeX. I would describe the language as a mix of markdown and dynamically t

Type-based vs. Value-based Reflection

Type-based vs Value-based Reflection Frequently, whenever the topic of Reflection comes up, I see a lot of complains specifically about the new syntax being added to support Reflection in C++26. I’ve always thought of that as being largely driven by unfamiliarity — this syntax is new, unfamiliar, and thus bad. I thought I’d take a different tactic in this post: let’s take a problem that can only be solved with Reflection and compare what the solution would look like between: the C++26 value-ba