@@ 16-41 (lines=26) @@ | ||
13 | * |
|
14 | * https://html.spec.whatwg.org/multipage/semantics.html#the-iframe-element |
|
15 | */ |
|
16 | class Iframe extends OpenElement implements FlowContent, PhrasingContent, EmbeddedContent, InteractiveContent |
|
17 | { |
|
18 | protected function getAllowedAttributes() |
|
19 | { |
|
20 | $iframeAllowedAttributes = array( |
|
21 | '/^src$/i' => Element::ATTR_URI, |
|
22 | '/^srcdoc$/i' => Element::ATTR_CS_STRING, |
|
23 | '/^name$/i' => Element::ATTR_CS_STRING, |
|
24 | '/^sandbox$/i' => Element::ATTR_CS_STRING, |
|
25 | '/^allowfullscreen$/i' => Element::ATTR_CS_STRING, |
|
26 | '/^width$/i' => Element::ATTR_INT, |
|
27 | '/^height$/i' => Element::ATTR_INT, |
|
28 | '/^referrerpolicy$/i' => Element::ATTR_CS_STRING, |
|
29 | ); |
|
30 | ||
31 | return array_merge( |
|
32 | $iframeAllowedAttributes, |
|
33 | parent::getAllowedAttributes() |
|
34 | ); |
|
35 | } |
|
36 | ||
37 | public function isInteractiveContent() |
|
38 | { |
|
39 | return true; |
|
40 | } |
|
41 | } |
|
42 |
@@ 16-46 (lines=31) @@ | ||
13 | * |
|
14 | * https://html.spec.whatwg.org/multipage/semantics.html#the-object-element |
|
15 | */ |
|
16 | class Object extends OpenElement implements FlowContent, PhrasingContent, EmbeddedContent, InteractiveContent |
|
17 | { |
|
18 | protected function getAllowedAttributes() |
|
19 | { |
|
20 | $objectAllowedAttributes = array( |
|
21 | '/^data$/i' => Element::ATTR_CS_STRING, |
|
22 | '/^type$/i' => Element::ATTR_CS_STRING, |
|
23 | '/^typemustmatch$/i' => Element::ATTR_CS_STRING, |
|
24 | '/^name$/i' => Element::ATTR_CS_STRING, |
|
25 | '/^usemap$/i' => Element::ATTR_CS_STRING, |
|
26 | '/^form$/i' => Element::ATTR_CS_STRING, |
|
27 | '/^width$/i' => Element::ATTR_INT, |
|
28 | '/^height$/i' => Element::ATTR_INT |
|
29 | ); |
|
30 | ||
31 | return array_merge( |
|
32 | $objectAllowedAttributes, |
|
33 | parent::getAllowedAttributes() |
|
34 | ); |
|
35 | } |
|
36 | ||
37 | public function isInteractiveContent() |
|
38 | { |
|
39 | return true; |
|
40 | } |
|
41 | ||
42 | public function isTransparentElement() |
|
43 | { |
|
44 | return true; |
|
45 | } |
|
46 | } |
|
47 |