TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Inline Commenting with JavaScript. Looking for feedback

1 点作者 ggreiner超过 11 年前

1 comment

ceautery超过 11 年前
I couldn&#x27;t get it to work in Chrome (&quot;keyCode of undefined&quot; errors). This is similar to something I wrote for Automattic recently.<p>I was pretty pleased with how I tackled annotations across block level elements. Essentially you find your range&#x27;s start and end containers, and if they match you can just range.surroundContents on them, but otherwise you surroundContents multiple times, once for the start container to its end, once for the end container, from its start until the end of the range, and then for every block element in the middle. Fun stuff.
评论 #6649671 未加载