register static method
Implementation
static void register(BuildContext context, AttachDocument item) {
if (context.binding is! ServerAppBinding) {
// Return early in component tests.
return;
}
var binding = (context.binding as ServerAppBinding);
var adapter = _attach[binding] ??= AttachAdapter();
binding.addRenderAdapter(adapter);
var entry = adapter.entries[item.target] ??= (attributes: {}, children: []);
if (item.attributes != null) {
entry.attributes.addAll(item.attributes!);
}
if (item.children != null) {
binding.addRenderAdapter(_AttachChildrenAdapter(adapter, item.target, context as Element));
}
}