Embed
Package: Libraries.Web.Page · Inherits from: Libraries.Web.Page.AttributeAccepter, Libraries.Language.Object, Libraries.Web.Page.GlobalAttributeAccepter, Libraries.Web.Page.WebTag, Libraries.Web.Page.FlowContent
The Embed class represents HTML's (Hypertext Markup Language) embed tag which is used to define a container for an application or interactive content. You can find more information about this tag at: The embed attribute.
Example Code
use Libraries.Web.Page.all
class Main
action main
WebPage page
Embed embed
embed:SetAddress("http://images.free-extras.com/pics/s/smile-1613.jpg")
page:AddToBody(embed)
output page:Generate()
end
end
Actions
Generate()
This action gets the MIME type attribute of the embeded content. The type attribute maps to a MIME type of the content.
Returns
text: The MIME type attribute of the embeded content.
Example
use Libraries.Web.Page.Embed
use Libraries.Web.Page.Attribute
Embed embed
Attribute type = embed:GetType()
if type not= undefined
text mimeType = type:GetValue()
end
GetAddress()
This action gets the address attribute of the . The address is the location of the linked webpage or document.
Returns
Libraries.Web.Page.Attribute: The address of the link.
Example
use Libraries.Web.Page.Embed
use Libraries.Web.Page.Attribute
Embed embed
Attribute address = embed:GetAddress()
if address not= undefined
text href = address:GetValue()
end
GetHeight()
This action gets the height attribute of the embeded content.
Returns
Libraries.Web.Page.Attribute: The height in pixels of the embeded content.
Example
use Libraries.Web.Page.Embed
use Libraries.Web.Page.Attribute
Embed embed
Attribute heightInPixels = embed:GetAddress()
if heightInPixels not= undefined
text height = heightInPixels:GetValue()
end
GetType()
This action gets the MIME type attribute of the embeded content. The type attribute maps to a MIME type of the content.
Returns
Libraries.Web.Page.Attribute: The MIME type attribute of the embeded content.
Example
use Libraries.Web.Page.Embed
use Libraries.Web.Page.Attribute
Embed embed
Attribute type = embed:GetType()
if type not= undefined
text mimeType = type:GetValue()
end
GetWidth()
This action gets the width attribute of the embeded content.
Returns
Libraries.Web.Page.Attribute: The width in pixels of the embeded content.
Example
use Libraries.Web.Page.Embed
use Libraries.Web.Page.Attribute
Embed embed
Attribute widthInPixels = embed:GetAddress()
if widthInPixels not= undefined
text width = widthInPixels:GetValue()
end
SetAddress(text value)
This action sets the address attribute of the embeded content. The address is the location of the linked webpage or document.
Parameters
valuetext: The address of a webpage or document.
Example
use Libraries.Web.Page.Embed
Embed embed
embed:SetAddress("http://www.google.com")
SetHeight(text value)
This action sets the height attribute of the embeded content.
Parameters
valuetext: The height in pixel to set to the embeded content.
Example
use Libraries.Web.Page.Embed
Embed embed
embed:SetHeight("150")
SetType(text value)
This action sets the Type attribute of the embeded content. The type attribute maps to a MIME type of the content.
Parameters
valuetext: The MIME type for the content.
Example
use Libraries.Web.Page.Embed
Embed embed
embed:SetType("text/html")
SetWidth(text value)
This action sets the width attribute of the embeded content.
Parameters
valuetext: The width in pixel to set to the embeded content.
Example
use Libraries.Web.Page.Embed
Embed embed
embed:SetWidth("150")
Inherited Actions
2 actions from Libraries.Language.Object
10 actions from Libraries.Web.Page.AttributeAccepter
29 actions from Libraries.Web.Page.GlobalAttributeAccepter
- AddClassAttribute(text value)
- GetAccessKey()
- GetClassAttribute()
- GetContentEditable()
- GetContextMenu()
- GetDraggable()
- GetDropZone()
- GetHidden()
- GetIdentifier()
- GetLanguage()
- GetSpellcheck()
- GetStyle()
- GetTabIndex()
- GetTextDirection()
- GetTitle()
- SetAccessKey(text value)
- SetClassAttribute(text value)
- SetContentEditable(text value)
- SetContextMenu(text value)
- SetDraggable(boolean value)
- SetDropZone(text value)
- SetHidden(boolean value)
- SetIdentifier(text value)
- SetLanguage(text value)
- SetSpellcheck(boolean value)
- SetStyle(text value)
- SetTabIndex(text value)
- SetTextDirection(text value)
- SetTitle(text value)