-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fire callbacks when targets are added or removed #367
Closed
Closed
Commits on Apr 8, 2021
-
Fire callbacks when targets are added or removed
Closes [hotwired#336][] --- Implements the `TargetObserver` to monitor when elements declaring `[data-${identifier}-target]` are added or removed from a `Context` _after_ being connected and _before_ being disconnected. In support of iterating through target tokens, export the `TokenListObserver` module's `parseTokenString` function. [hotwired#336]: hotwired#336
Configuration menu - View commit details
-
Copy full SHA for 11649d7 - Browse repository at this point
Copy the full SHA 11649d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78c094b - Browse repository at this point
Copy the full SHA 78c094bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 86720fc - Browse repository at this point
Copy the full SHA 86720fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for c182b82 - Browse repository at this point
Copy the full SHA c182b82View commit details -
Incorporate code review feedback
Introduce the concept of a `TargetObserverDelegate`, then make `Context` implement the interface.
Configuration menu - View commit details
-
Copy full SHA for 770b2fd - Browse repository at this point
Copy the full SHA 770b2fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 21f2ca2 - Browse repository at this point
Copy the full SHA 21f2ca2View commit details -
Add
Node.isConnected
to polyfillsThe implementation was sourced from the [Mozilla Developer Network documentation][poyfill] for [Node.isConnected][] [poyfill]: https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected#polyfill [Node.isConnected]: https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected
Configuration menu - View commit details
-
Copy full SHA for e6e1d12 - Browse repository at this point
Copy the full SHA e6e1d12View commit details -
``` IE 11.0 (Windows 8.1) ERROR 133 Expected identifier, string or number 134 at @stimulus/core/dist/tests/index.js:2281:1 135 136 SyntaxError: Expected identifier, string or number 137 at ./packages/@stimulus/polyfills/index.js (@stimulus/core/dist/tests/index.js:2281:1) ``` ``` IE 11.0 (Windows 8.1) target disconnected callback when element is removed FAILED 125 Promise rejected during "target disconnected callback when element is removed": Object doesn't support property or method 'remove' 126 TypeError: Object doesn't support property or method 'remove' 127 at Anonymous function (eval code:191:25) ```
Configuration menu - View commit details
-
Copy full SHA for 1b6e95e - Browse repository at this point
Copy the full SHA 1b6e95eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef175d5 - Browse repository at this point
Copy the full SHA ef175d5View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.