Skip to content

Commit

Permalink
Add support for template and slot
Browse files Browse the repository at this point in the history
  • Loading branch information
marschall committed Jul 6, 2024
1 parent dd91bf6 commit 227f142
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tags-web-components
slot: aBlock
self slot with: aBlock

Check warning on line 3 in repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/slot..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/slot..st#L1-L3

Added lines #L1 - L3 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tags-web-components
slot

^ self brush: WASlotTag new

Check warning on line 4 in repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/slot.st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/slot.st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tags-web-components
template: aBlock
self template with: aBlock

Check warning on line 3 in repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/template..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/template..st#L1-L3

Added lines #L1 - L3 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tags-web-components
template

^ self brush: WATemplateTag new

Check warning on line 4 in repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/template.st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WAHtmlCanvas.class/instance/template.st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The slot HTML element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
attributes
name: aSring
"The slot's name."
self attributeAt: 'name' put: aSring

Check warning on line 4 in repository/Seaside-Canvas.package/WASlotTag.class/instance/name..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WASlotTag.class/instance/name..st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
tag
^ 'slot'

Check warning on line 3 in repository/Seaside-Canvas.package/WASlotTag.class/instance/tag.st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WASlotTag.class/instance/tag.st#L1-L3

Added lines #L1 - L3 were not covered by tests
11 changes: 11 additions & 0 deletions repository/Seaside-Canvas.package/WASlotTag.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "Anonymous 7/6/2024 14:52",
"super" : "WATagBrush",
"category" : "Seaside-Canvas-Tags",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WASlotTag",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template HTML element serves as a mechanism for holding HTML fragments, which can either be used later via JavaScript or generated immediately into shadow DOM.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
shadowRootClonable: aBoolean
"Sets the value of the clonable property of a ShadowRoot created using this element to true. If set, a clone of the shadow host (the parent element of this <template>) created with Node.cloneNode() or Document.importNode() will include a shadow root in the copy."
self attributeAt: 'shadowrootclonable' put: aBoolean

Check warning on line 4 in repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootClonable..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootClonable..st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
shadowRootDelegatesFocus: aBoolean
"Sets the value of the delegatesFocus property of a ShadowRoot created using this element to true. If this is set and a non-focusable element in the shadow tree is selected, then focus is delegated to the first focusable element in the tree. The value defaults to false."
self attributeAt: 'shadowrootdelegatesfocus' put: aBoolean

Check warning on line 4 in repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootDelegatesFocus..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootDelegatesFocus..st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
as yet unclassified
shadowRootMode: aString
"Creates a shadow root for the parent element. It is a declarative version of the Element.attachShadow() method and accepts the same enumerated values.
open
Exposes the internal shadow root DOM for JavaScript (recommended for most use cases).
closed
Hides the internal shadow root DOM from JavaScript."
self attributeAt: 'shadowrootmode' put: aString

Check warning on line 10 in repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootMode..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootMode..st#L1-L10

Added lines #L1 - L10 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
shadowRootSerializable: aBoolean
"Sets the value of the serializable property of a ShadowRoot created using this element to true. If set, the shadow root may be serialized by calling the Element.getHTML() or ShadowRoot.getHTML() methods with the options.serializableShadowRoots parameter set true. The value defaults to false."
self attributeAt: 'shadowrootserializable' put: aBoolean

Check warning on line 4 in repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootSerializable..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WATemplateTag.class/instance/shadowRootSerializable..st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
tag
^ 'template'

Check warning on line 3 in repository/Seaside-Canvas.package/WATemplateTag.class/instance/tag.st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Canvas.package/WATemplateTag.class/instance/tag.st#L1-L3

Added lines #L1 - L3 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "Anonymous 7/6/2024 14:40",
"super" : "WATagBrush",
"category" : "Seaside-Canvas-Tags",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WATemplateTag",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
SystemOrganization addCategory: #'Seaside-Canvas'!
SystemOrganization addCategory: #'Seaside-Canvas-Base'!
SystemOrganization addCategory: #'Seaside-Canvas-Canvas'!
SystemOrganization addCategory: #'Seaside-Canvas-Tags'!
self packageOrganizer ensurePackage: #'Seaside-Canvas' withTags: #(#Base #Canvas #Tags)!

0 comments on commit 227f142

Please sign in to comment.