diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts index ca941b7be988..f085c55f77be 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -6,8 +6,9 @@ import { string_literal } from '../../../utils/stringify'; import { b, x } from 'code-red'; import Expression from '../../../nodes/shared/Expression'; import Text from '../../../nodes/Text'; +import { Identifier, Node } from 'estree'; -export default class AttributeWrapper { +export class BaseAttributeWrapper { node: Attribute; parent: ElementWrapper; @@ -20,7 +21,29 @@ export default class AttributeWrapper { parent.not_static_content(); block.add_dependencies(node.dependencies); + } + } + + render(_block: Block) {} +} +export default class AttributeWrapper extends BaseAttributeWrapper { + node: Attribute; + parent: ElementWrapper; + metadata: any; + name: string; + property_name: string; + is_indirectly_bound_value: boolean; + is_src: boolean; + is_select_value_attribute: boolean; + is_input_value: boolean; + should_cache: boolean; + last: Identifier; + + constructor(parent: ElementWrapper, block: Block, node: Attribute) { + super(parent, block, node); + + if (node.dependencies.size > 0) { // special case —