Skip to content

Commit 1f1bb85

Browse files
committed
Add IFRAME class for <iframe> html tags
1 parent dcc2421 commit 1f1bb85

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

M2/Macaulay2/m2/content.m2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ BlockExtra = set {}
5454
---<!ENTITY % Form.class "| %form.qname;" >
5555
---<!ENTITY % Fieldset.class "| %fieldset.qname;" >
5656
---<!ENTITY % BlkSpecial.class "%Table.class; %Form.class; %Fieldset.class;" >
57-
BlkSpecial = set { "table", "form", "fieldset" }
57+
BlkSpecial = set { "table", "form", "fieldset", "iframe"}
5858

5959
-- <!ENTITY % Blkpres.class "| %hr.qname;" >
6060
---<!ENTITY % BlkPres.class "| %hr.qname;" >
@@ -109,6 +109,7 @@ validContent = new MutableHashTable
109109
-----------------------------------------------------------------------------
110110
-- <!ENTITY % dd.content "( #PCDATA | %Flow.mix; )*" >
111111
validContent#"dd" =
112+
validContent#"iframe" =
112113
-- <!ENTITY % li.content "( #PCDATA | %Flow.mix; )*" >
113114
validContent#"li" =
114115
-- <!ENTITY % div.content "( #PCDATA | %Flow.mix; )*" >

M2/Macaulay2/m2/hypertext.m2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ DIV = new MarkUpType of HypertextContainer
133133
BR = new MarkUpType of HypertextVoid
134134
HR = new MarkUpType of HypertextVoid
135135
SCRIPT = new MarkUpType of HypertextParagraph
136+
IFRAME = new MarkUpType of HypertextContainer
136137

137138
-- Headers
138139
HEADER1 = new MarkUpType of HypertextParagraph
@@ -372,6 +373,9 @@ addAttribute(TH, htmlAttr | {"colspan", "headers", "rowspan"})
372373
addAttribute(IMG, htmlAttr | {"alt", "src", "srcset", "width", "height",
373374
"sizes", "crossorigin", "longdesc", "referrerpolicy", "ismap", "usemap"})
374375
addAttribute(OL, htmlAttr | {"start"=>"0", "reversed", "type"})
376+
addAttribute(IFRAME, htmlAttr | {"allow", "allowfullscreen",
377+
"allowpaymentrequest", "height", "loading", "name", "referrerpolicy",
378+
"sandbox", "src", "srcdoc", "width"})
375379
buttonAttr = htmlAttr | {"autofocus","disabled",
376380
"form","formaction","formenctype","formmethod","formnovalidate","formtarget",
377381
"name", "type", "value"}

M2/Macaulay2/packages/Text.m2

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ newPackage("Text",
99

1010
exportFrom_Core {
1111
"ANCHOR", "BLOCKQUOTE", "BODY", "BOLD", "BR", "CDATA", "CODE", "COMMENT", "DD", "DIV", "DL", "DT", "EM", "ExampleItem", "HEAD", "HEADER1",
12-
"HEADER2", "HEADER3", "HEADER4", "HEADER5", "HEADER6", "HR", "HREF", "HTML", "Hypertext", "HypertextContainer", "HypertextParagraph", "HypertextVoid", "IMG", "INDENT", "ITALIC", "KBD",
12+
"HEADER2", "HEADER3", "HEADER4", "HEADER5", "HEADER6", "HR", "HREF", "HTML", "Hypertext", "HypertextContainer", "HypertextParagraph", "HypertextVoid", "IFRAME", "IMG", "INDENT", "ITALIC", "KBD",
1313
"LABEL", "LATER", "LI", "LINK", "LITERAL", "M2CODE", "MENU", "META", "PARA", "PRE", "SAMP", "SCRIPT", "SMALL", "SPAN", "STRONG", "STYLE", "SUB", "SUBSECTION", "SUP", "TABLE", "TD", "TH",
1414
"TEX", "TITLE", "TO", "TO2", "TOH", "TR", "TT", "UL", "VAR", "OL", "INPUT", "BUTTON", "validate",
1515
"MarkUpType", "IntermediateMarkUpType",
@@ -855,6 +855,19 @@ document {
855855
"For an example, see ", TO "Macaulay2Doc::hypertext list format", "."
856856
}
857857
858+
document {
859+
Key => {IFRAME},
860+
Headline => "HTML inline frame (iframe) element",
861+
Usage => "IFRAME x",
862+
Inputs => {"x" => List => "specifying the iframe attributes"},
863+
PARA {
864+
"An ", M2CODE "IFRAME", " object represents an inline frame in HTML, ",
865+
"which allows embedding an independent browsing context (another HTML ",
866+
"document) within the current one."},
867+
EXAMPLE "html IFRAME {\"src\" => \"https://example.com\"}",
868+
PARA {"This is rendered in the browser as:"},
869+
IFRAME {"src" => "https://example.com"}}
870+
858871
document { Key => (options, MarkUpType),
859872
"Optional arguments of mark up types allow attributes to be added to html elements.",
860873
EXAMPLE lines ///

0 commit comments

Comments
 (0)