tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

interact-events-203-t-isvalid.html (4696B)


      1 <!DOCTYPE html>
      2 <html lang='en'>
      3 <head>
      4 <title>interact-events-203-t-manual.svg</title>
      5 <meta charset='utf-8'>
      6 </head>
      7 <body>
      8 <h1>Source SVG: interact-events-203-t-manual.svg</h1>
      9 <svg id="svg-root" width="100%" height="100%"
     10  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
     11  xmlns:xlink="http://www.w3.org/1999/xlink">
     12  <!--======================================================================-->
     13  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
     14  <!--=  Institute of Technology, European Research Consortium for         =-->
     15  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
     16  <!--=  All Rights Reserved.                                              =-->
     17  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
     18  <!--======================================================================-->
     19  
     20  <title id="test-title">$RCSfile: interact-events-203-t.svg,v $</title>
     21  <defs>
     22    <font-face
     23      font-family="SVGFreeSansASCII"
     24      unicode-range="U+0-7F">
     25      <font-face-src>
     26        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
     27      </font-face-src>
     28    </font-face>
     29  </defs>
     30  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
     31 
     32 	<defs>
     33 		<!-- SVGElementInstance animates fill on mouseover -->
     34 		<rect id="rect" width="50" height="50" fill="red" onmouseover="document.getElementById('rect').setAttribute('fill','blue')" onmouseout="document.getElementById('rect').setAttribute('fill','red')" />
     35 	</defs>
     36 
     37    <text x="120" y="20" font-size="15">Shadow tree event listener chain</text>
     38 
     39    <!--basic event dispatch - all rectangles turn blue -->
     40    <use fill="red" x="30" y="30" xlink:href="#rect"/>
     41    <text x="95" y="45" font-size="12">Case 1: on mouseover all squares must turn blue</text>
     42 
     43    <!-- event bubbling from SVGElementInstance to referencing element -->
     44    <!-- all rectangles turn blue and second rectangle displays black stroke  -->
     45    <use id="use2" fill="red" x="30" y="100" xlink:href="#rect" onmouseover="document.getElementById('rect1').setAttribute('stroke','black')" onmouseout="document.getElementById('rect1').setAttribute('stroke','none')"/>
     46    <rect id="rect1" pointer-events="none" x="30" y="100" width="50" height="50" fill="none" stroke-width="5" stroke="none"/>
     47    
     48    <g font-size="12">
     49      <text x="95" y="115">Case 2: on mouseover all squares must turn blue</text>
     50      <text x="95" y="130">and a black stroke must appear on reference square</text>
     51    </g>
     52 
     53    <!-- event bubbling from SVGElementInstance to referencing element ancestors-->
     54    <!-- all rectangles turn blue and third rectangle displays black stroke  -->
     55    <g id="g1" onmouseover="document.getElementById('rect2').setAttribute('stroke','black')" onmouseout="document.getElementById('rect2').setAttribute('stroke','none')">
     56      <use fill="red" x="30" y="170" xlink:href="#rect"/>
     57      <rect id="rect2" pointer-events="none" x="30" y="170" width="50" height="50" fill="none" stroke-width="5" stroke="none"/>
     58    </g>
     59    <g font-size="12">
     60      <text x="95" y="185">Case 3: on mouseover all squares must turn blue</text>
     61      <text x="95" y="200">and a black stroke must appear on reference square</text>
     62    </g>
     63 
     64    <!--SVGElementInstance is not effected by event listener on referencing element   -->
     65    <!-- all rectangles turn blue and displays black stroke only on mouse down  -->
     66    <use id="use3" fill="red" x="30" y="240" xlink:href="#rect" onmousedown="document.getElementById('rect3').setAttribute('stroke','black')" onmouseup="document.getElementById('rect3').setAttribute('stroke','none')"/>
     67    <rect id="rect3" pointer-events="none" x="30" y="240" width="50" height="50" fill="none" stroke-width="5" stroke="none"/>
     68    <g font-size="12">
     69      <text x="95" y="255">Case 4: on mouseover all squares must turn blue</text>
     70      <text x="95" y="270">and on mousedown a black stroke must appear on reference square</text>
     71    </g>
     72 
     73  </g>
     74  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
     75    <text id="revision" x="10" y="340" stroke="none"
     76      fill="black">$Revision: 1.4 $</text>
     77  </g>
     78  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
     79  <!-- comment out this watermark once the test is approved
     80  <g id="draft-watermark">
     81    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
     82    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
     83      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
     84  </g>-->
     85 </svg>
     86 </body>
     87 </html>