This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 20 September 2023 | |
// onpropertychange signal v.5 | |
// cont'd from https://gist.github.com/dfkaye/428abdeca224c37014d27fc420906d88 | |
// propertychange events on a node with a mixture of property descriptors and | |
// proxy handlers | |
// come back to this for the onpropertychange part | |
// SEE sketch 17 September 2023, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 18 september 2023 | |
// onpropertychange signal v.4 | |
// cont'd from https://gist.github.com/dfkaye/4e06eb749f878662e31a6cb019fbd650 | |
// re-done in less than 30 minutes, this implementation makes more sense and | |
// works for arrays and objects... | |
// 19 September 2023 | |
// dispatch propertychange event in deleteProperty handler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 17 September 2023 | |
// onpropertychange signal v.3 | |
// onpropertychange sketch for form element nodes | |
// cont'd from https://gist.github.com/dfkaye/d849596bdb9e926ad69ad38c974a4763 | |
function N(node) { | |
var target = node; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 16 september 2023 | |
// onpropertychange signal v.2 | |
// An implementation with proxied objects. | |
// cont'd from https://gist.github.com/dfkaye/619c5f31080fce2cd383ac966e132311 | |
//////////////////////////////////////////////////////////////////////////////// | |
// early afternoon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 15 September 2023 | |
// onpropertychange signal v.1 | |
// This begins a 12-day odyssey in search of a successful implementation of the | |
// `onpropertychange` handler once supported by Internet Explorer in browser | |
// days of yore. | |
// cf. v.9 for the successful solution that solves both Object and EvenTarget, | |
// https://gist.github.com/dfkaye/2c7de4ba9bf7758f3c052378ce46219a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 5 September 2023 | |
// `this` inside array methods | |
// Value of `this` inside array depends on whether `this` appears in function | |
// vs. constructor scope, and whether the iteration method calls a normal vs. an | |
// arrow function. | |
/* | |
scope | iterator | |
------------+------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 30 August 2023 | |
// Note about strict mode and destructuring parameters. | |
// Setting strict mode at the top of the console... | |
"use strict"; | |
// ...makes the following assignment in the try block fail: | |
console.group("init"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 29-30 August 2023 | |
// console.styled.js | |
// Using console parts to create styled output. | |
// # Multiple output statements with `console.[method].apply` | |
// Usually we log console statements with any number of arguments. | |
console.log("one"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 5 September 2023 | |
// Find uncontrolled or bare text node siblings in a DOM, | |
// XPath approach. | |
// SEE sketch 27 August 2023, Node iteration approach. | |
// https://gist.github.com/dfkaye/6cc8a9cda513dcf97f7a45ba89f4000b | |
// 6 September 2023 | |
// I have to say, | |
// 1. Over all, this solution feels better than the node iteration version, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 27 August 2023 | |
// Find uncontrolled or bare text node siblings in a DOM, | |
// Node iteration approach. | |
// SEE sketch 5 September 2023, XPath approach. | |
// https://gist.github.com/dfkaye/6bf4fa391cec4e9a9c44cc05af504ae5 | |
// There's no such official term for bare text nodes. I refer to a text node as | |
// "uncontrolled" or "bare" when it shares a parent with a sibling element or | |
// comment. Uncontrolled text nodes are slightly harder to update dynamically, |