This mixin provides semantic wrapper capabilities. When mixed it creates a sematicWrapper configuration option.
Calling the generateSemanticWrapper() function from a mixing object and with a targetNode attribute will validate
the semanticWrapper option supplied, generate the required semantic wrapper and return it.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Example
{
name: "alfresco/footer/AlfShareFooter",
config: {
semanticWrapper: "footer", // This AlfShareFooter is automatically wrapped in a <footer></footer> tag.
licenseLabel: "licenseHolder",
copyrightLabel: "footerCopyRight",
altText: "footerLogoAltText",
logoImageSrc: "footerLogo",
cssClass: "footerCssClass"
}
}
Members
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/_SematicWrapperMixin.css"}]
- Source:
-
semanticWrapper :string
-
The optional semantic wrapper to be applied around the content.
Type:
- string
- Default Value:
- null
- Source:
-
<private, inner> _semanticWrapperOptions :String[]
-
The semantic tags that could be used for the sematicWrapper.
Type:
- String[]
- Default Value:
- ["header", "nav", "section", "article", "aside", "figure", "figcaption", "footer", "details", "summary", "mark", "time"]
- Source:
Methods
-
generateSemanticWrapper(outerNode, innerNode)
-
Create and return a semantic wrapper node inside the specified outer node, with optional inner node content injected into the created semantic wrapper.
Parameters:
Name Type Description outerNode
element The DOM node within which the semantic wrapper should be created innerNode
element The DOM node that should be moved into the created semantic wrapper