Re: [whatwg/dom] Add convenient, ergonomic, performant API for sorting siblings (#586)

For N elements there are at least N! distinct possible renderings of the content without duplicate orderings of the sets. A map of the total possible permutations of the input data (HTML content as string) could be created corresponding each set to a distinct logical key. When the predefined conditions are met, the value for the single logical key can be set at `.innerHTML` or `.outerHTML` of N elements. The total possible input data (for example, HTML, JSON, etc.) map of possible orderings can be stored in `document` itself; at an element `data-*` attribute (as JSON); `<template>` element; or other node for example a `ProcessingInstrcution` node. The sorting would take place once for initial data,  and once more when data is added to the set; following the content orders can be retrieved from the mapped set of possible orderings when the logical conditions are met.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/586#issuecomment-373560899

Received on Friday, 16 March 2018 00:04:51 UTC