guest271314 (2019-05-23T01:27:46.000Z)
guest271314 at gmail.com (2019-05-23T01:37:13.692Z)
> Thanks for the link. My current approach is similar to what you and the article describe. Maybe it’s just the old DBA in me, but even when I narrow my parameters `(node.querySelector(“[…]”))` it feels like I’m doing a lot of “full table scans” when I would want to index some of the “columns”. I’m sure the engines are pretty optimized for this though. What do you mean by "Unique Indexes" (specifically unique within the scope of an HTML ```document``` indexes of elements are already unique) and "full table scans" (relevant to CSS specificity; that is, what code are you using now that is not capable of selecting specific elements, and attribute values)? CSS selectors can select any element by a variety of attribute name and value combinators, including using ```data-*``` attributes and Microdata. It is the responsibility of the developer to create unique names and values for HTML elements - and to not create duplicate ```id```s. Is the HTML being used dynamic or static? Whether the HTML is dynamic or static ```Map``` and ```WeakMap``` can be used for "unique" key-value pairs of HTML elements, and HTML element attributes and values.
guest271314 at gmail.com (2019-05-23T01:30:04.589Z)
> Thanks for the link. My current approach is similar to what you and the article describe. Maybe it’s just the old DBA in me, but even when I narrow my parameters `(node.querySelector(“[…]”))` it feels like I’m doing a lot of “full table scans” when I would want to index some of the “columns”. I’m sure the engines are pretty optimized for this though. What do you mean by "Unique Indexes" (specifically unique within the scope of an HTML ```document```) and "full table scans" (relevant to CSS specificity; that is, what code are you using now that is not capable of selecting specific elements, and attribute values)? CSS selectors can select any element by a variety of attribute name and value combinators, including using ```data-*``` attributes and Microdata. It is the responsibility of the developer to create unique names and values for HTML elements - and to not create duplicate ```id```s. Is the HTML being used dynamic or static? Whether the HTML is dynamic or static ```Map``` and ```WeakMap``` can be used for "unique" key-value pairs of HTML elements, and HTML element attributes and values.