A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/svg/elements/switch below:

switch ยท WebPlatform Docs

switch Overview Table
DOM Interface
SVGElement
Examples

The following code example uses the switch element to provide a graphical representation of a paragraph if XMHTML is not supported.



<?xml version="1.0" standalone="yes"?>
<svg width="4in" height="3in" version="1.1"
 xmlns = 'http://www.w3.org/2000/svg'>
  
  <switch>
    
    <foreignObject width="100" height="50"
                   requiredExtensions="http://example.com/SVGExtensions/EmbeddedXHTML">
      
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>Here is a paragraph that requires word wrap.</p>
      </body>
    </foreignObject>
    
    <text font-size="10" font-family="Verdana">
      <tspan x="10" y="10">Here is a paragraph that</tspan>
      <tspan x="10" y="20">requires word wrap.</tspan>
    </text>
  </switch>
</svg>
Notes Remarks

Note: In addition to the attributes, properties, events, methods, and styles listed above, SVG elements also inherent core HTML attributes, properties, events, methods, and styles.

The switch element evaluates the requiredFeatures, requiredExtensions, and systemLanguage attributes on its direct child elements in order, and then processes and renders the first child element that these attributes evaluate to TRUE for. All other child elements are skipped and not rendered. If the child element is a container element (such as an g element), the entire subtree is processed and rendered or skipped and not rendered.

The values of the display and visibility properties does not affect the switch element processing. In particular, if you set display to none on a child element of a switch element, it does not affect TRUE and FALSE testing that is associated with processing switch elements.

Standards information Members

The SVGSwitchElement object has these events:

The SVGSwitchElement object has these methods:

The SVGSwitchElement object has these properties:

Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4