Files
blockly/core
jschanker de1b3214be Enforce connection preconditions for setParent (#4999)
* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).

* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Error now thrown when calling `a.setParent(null)` if a is connected to a superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).

* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.

* Fix error conditions for setParent google#4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.
* Adjusted comment.

* Removed unnecessary set to null/added tests

* One is failing (commented out), will investigate later

* Lint fix

* Removed failing test that correctly fails

* Update comments to conform to style guide

Capitalize first letter, period at end
2021-07-13 13:56:42 -07:00
..
2021-06-09 11:41:42 -07:00
2021-06-18 09:53:43 -07:00
2021-02-25 17:17:42 -08:00
2021-07-07 14:42:18 +00:00
2021-06-28 11:09:01 -07:00
2021-05-27 21:30:26 -07:00
2021-03-05 09:50:51 -08:00
2021-06-03 08:23:01 -07:00
2021-06-18 09:53:43 -07:00
2021-06-09 11:41:42 -07:00
2021-06-09 11:41:42 -07:00
2021-06-09 11:41:42 -07:00
2021-07-11 23:19:01 -07:00
2021-07-11 23:19:01 -07:00
2021-05-27 21:30:26 -07:00
2021-07-11 23:19:01 -07:00
2021-05-19 09:57:14 -07:00
2021-05-27 21:30:26 -07:00
2021-06-09 11:41:42 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2020-02-11 13:27:20 -08:00
2021-06-09 13:59:22 -07:00
2021-06-09 11:41:42 -07:00
2021-05-19 09:57:14 -07:00
2021-06-09 11:41:42 -07:00
2021-05-27 21:30:26 -07:00
2021-06-09 11:41:42 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-05-27 21:30:26 -07:00
2021-06-09 11:41:42 -07:00
2021-05-27 21:30:26 -07:00
2021-06-09 11:41:42 -07:00