blockly > fieldRegistry
fieldRegistry namespace
Functions
Function |
Description |
register(type, fieldClass) |
Registers a field type. fieldRegistry.fromJson uses this registry to find the appropriate field type. |
unregister(type) |
Unregisters the field registered with the given type. |
Interfaces
Interface |
Description |
RegistrableField |
Represents the static methods that must be defined on any field that is registered, i.e. the constructor and fromJson methods. Because we don't know which Field subclass will be registered, we are unable to typecheck the parameters of the constructor. |
Variables
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `fieldRegistry` namespace manages the registration and unregistration of field types in Blockly."],["It provides functions like `register` and `unregister` to interact with the field type registry."],["The `RegistrableField` interface defines the necessary static methods for any registered field type, including a constructor and a `fromJson` method."],["A `TEST_ONLY` variable is present within this namespace, potentially for testing purposes."]]],[]]