- From: Jan Miksovsky <notifications@github.com>
- Date: Mon, 18 Dec 2017 09:26:35 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 18 December 2017 17:26:57 UTC
I wanted to offer a proposal for [bulk property updates](https://github.com/ComponentKitchen/bulk-properties) to efficiently set multiple HTML element properties at once. Example: ```js const div = document.createElement('div'); div.applyProperties({ attributes: { role: 'main' }, style: { color: 'red' }, textContent: 'Hello, world.' }); ``` The above would be exactly equivalent to: ```js const div = document.createElement('div'); div.setAttribute('role', 'main'); div.style.color = 'red'; div.textContent = 'Hello, world.'; ``` In either case, the result is the same: ```html <div role="main" style="color: red;">Hello, world.<div> ``` The proposal outlines some other ideas along this line, including the ability to apply properties to multiple elements identified by `id`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/718
Received on Monday, 18 December 2017 17:26:57 UTC