Skip to content

Commit

Permalink
remove span tag in web/events
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored and irvin committed May 11, 2022
1 parent fd42562 commit aae6a3e
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2 id="创建自定义事件">创建自定义事件</h2>

<p>上述代码使用了 <a href="/zh-CN/docs/Web/API/EventTarget/dispatchEvent">EventTarget.dispatchEvent()</a> 方法。</p>

<p><span style="line-height: 1.5;">绝大多数现代浏览器中都会支持这个构造函数(Internet Explorer 例外)。 要了解更为复杂的方法,可参考下面的 </span><a href="#The_old-fashioned_way" style="line-height: 1.5;" title="#过时的方式">过时的方式</a><span style="line-height: 1.5;">  一节。</span></p>
<p>绝大多数现代浏览器中都会支持这个构造函数(Internet Explorer 例外)。 要了解更为复杂的方法,可参考下面的 <a href="#The_old-fashioned_way" style="line-height: 1.5;" title="#过时的方式">过时的方式</a>  一节。</p>

<h3 id="添加自定义数据_–_CustomEvent">添加自定义数据 – CustomEvent()</h3>

Expand All @@ -35,7 +35,7 @@ <h3 id="添加自定义数据_–_CustomEvent">添加自定义数据 – CustomE

<pre class="brush: js">var event = new CustomEvent('build', { 'detail': elem.dataset.time });</pre>

<p><span style="line-height: 1.5;">下面的代码允许你在事件监听器中访问更多的数据:</span></p>
<p>下面的代码允许你在事件监听器中访问更多的数据:</p>

<pre class="brush: js">function eventHandler(e) {
log('The time is: ' + e.detail);
Expand Down
Loading

0 comments on commit aae6a3e

Please sign in to comment.