WET core

Working examples of WET core's built-in methods.

Example 1 - wb.getId() and ID conflicts

Demonstrates how wb.getId() reacts when hardcoded IDs conflict with its naming convention (anything starting with wb-auto-).

Hardcoded IDs

  • wb-auto-
  • wb-auto-3abc
  • wb-auto-4.
  • wb-auto-17
  • wb-auto-5.0
  • wb-auto-1
  • wb-auto-6.1
  • wb-auto-2
  • wb-auto-abc9

Tables plugin

This plugin calls wb.getId().

Rendering engine Browser
Blink Chromium
Gecko Firefox
WebKit Safari

Code sample

<section>
	<h2 id="ex1">Example 1 - <code>wb.getId()</code> and ID conflicts</h2>
	<p>Demonstrates how <code>wb.getId()</code> reacts when hardcoded IDs conflict with its naming convention (anything starting with <code>wb-auto-</code>).</p>

	<section>
		<h3>Hardcoded IDs</h3>
		<ul>
			<li id="wb-auto-"><code>wb-auto-</code></li>
			<li id="wb-auto-3abc"><code>wb-auto-3abc</code></li>
			<li id="wb-auto-4."><code>wb-auto-4.</code></li>
			<li id="wb-auto-17"><code>wb-auto-17</code></li>
			<li id="wb-auto-5.0"><code>wb-auto-5.0</code></li>
			<li id="wb-auto-1"><code>wb-auto-1</code></li>
			<li id="wb-auto-6.1"><code>wb-auto-6.1</code></li>
			<li id="wb-auto-2"><code>wb-auto-2</code></li>
			<li id="wb-auto-abc9"><code>wb-auto-abc9</code></li>
		</ul>
	</section>

	<section>
		<h3>Tables plugin</h3>
		<p>This plugin calls <code>wb.getId()</code>.</p>
		<table class="wb-tables table">
			<thead>
				<tr>
					<th>Rendering engine</th>
					<th>Browser</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>Blink</td>
					<td>Chromium</td>
				</tr>
				<tr>
					<td>Gecko</td>
					<td>Firefox</td>
				</tr>
				<tr>
					<td>WebKit</td>
					<td>Safari</td>
				</tr>
			</tbody>
		</table>
	</section>
</section>
Date modified: