class Can::AST::Element

Overview

HTML element or component invocation.

Codegen resolves the tag as a component when a matching component method is known; otherwise the tag passes through as literal HTML.

Defined in:

can/ast.cr

Constructors

Instance Method Summary

Instance methods inherited from class Can::AST::Node

column : Int32 column, column=(column : Int32) column=, line : Int32 line, line=(line : Int32) line=

Constructor methods inherited from class Can::AST::Node

new(line : Int32 = 0, column : Int32 = 0) new

Constructor Detail

def self.new(tag : String, attributes : Array(Can::AST::Attribute) = [] of Attribute, children : Array(Can::AST::Node) = [] of Node, self_closing : Bool = false, line = 0, column = 0) #

[View source]

Instance Method Detail

def attributes : Array(Attribute) #

[View source]
def attributes=(attributes : Array(Attribute)) #

[View source]
def children : Array(Node) #

[View source]
def children=(children : Array(Node)) #

[View source]
def self_closing : Bool #

[View source]
def self_closing=(self_closing : Bool) #

[View source]
def tag : String #

[View source]
def tag=(tag : String) #

[View source]