Skip to content

Commit

Permalink
Switch from idle callback to post task.
Browse files Browse the repository at this point in the history
  • Loading branch information
szager-chromium committed Nov 19, 2016
1 parent 0285265 commit 2bad9ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
10 changes: 2 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ urlPrefix: https://dom.spec.whatwg.org/
urlPrefix: http://www.w3.org/TR/hr-time/
type: typedef; text: DOMHighResTimeStamp
type: dfn; text: time origin
url: http://w3c.github.io/requestidlecallback/#dfn-list-of-idle-request-callbacks; type: dfn; text: list of idle request callbacks
urlPrefix: https://html.spec.whatwg.org/multipage/
urlPrefix: dom.html
url: #the-document-object; type:dfn; text: Document
Expand All @@ -31,6 +30,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/
urlPrefix: webappapis.html;
type: dfn; text: report the exception
type: dfn; text: event loop
type: dfn; text: queue a task
type: dfn; text: run the fullscreen rendering steps
type: dfn; text: run the animation frame callbacks
url: #processing-model-8; type: dfn; text: HTML Processing Model
Expand Down Expand Up @@ -514,13 +514,7 @@ run these steps:
1. If |document|'s <a>IntersectionObserverTaskQueued</a> flag is set to true,
return.
2. Set |document|'s <a>IntersectionObserverTaskQueued</a> flag to true.
3. Enqueue a task to <a>notify intersection observers</a>
in the <a>list of idle request callbacks</a>
with a |timeout| of 100.

Issue: Should we use something other than 100ms as |timeout|?

Issue: Should we consider making this just post a task instead?
3. <a>Queue a task</a> to the <a>document</a>'s <a>event loop</a> to <a>notify intersection observers</a>.

<h4 id='notify-intersection-observers-algo'>
Notify Intersection Observers</h4>
Expand Down
15 changes: 3 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<meta content="ED" name="w3c-status">
<link href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED" rel="stylesheet" type="text/css">
<meta content="Bikeshed version 0aa2eb3dddf45f17630f6cfecbc54207812ef9db" name="generator">
<meta content="Bikeshed version 645534c1532bca4fdb4f3859efc66268a218d7c8" name="generator">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
Expand Down Expand Up @@ -253,15 +253,14 @@
<header>
<p data-fill-with="logo"><a href="https://www.w3.org/"><img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"></a> </p>
<h1 class="p-name no-ref" id="title">Intersection Observer 1</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-11-14">14 November 2016</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-11-19">19 November 2016</time></span></h2>
</header>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://github.com/WICG/IntersectionObserver/">https://github.com/WICG/IntersectionObserver/</a>
<dt>Issue Tracking:
<dd><a href="https://github.com/WICG/IntersectionObserver/issues/">GitHub</a>
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editor:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:[email protected]">Michael Blain</a> (<span class="p-org org">Google</span>)
</dl>
Expand Down Expand Up @@ -346,7 +345,6 @@ <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
</ol>
<li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ol>
</nav>
<main>
Expand Down Expand Up @@ -763,9 +761,7 @@ <h4 class="heading settled" data-level="3.2.1" id="queue-intersection-observer-t
<li data-md="">
<p>Set <var>document</var>’s <a data-link-type="dfn" href="#document-intersectionobservertaskqueued" id="ref-for-document-intersectionobservertaskqueued-2">IntersectionObserverTaskQueued</a> flag to true.</p>
<li data-md="">
<p>Enqueue a task to <a data-link-type="dfn" href="#notify-intersection-observers" id="ref-for-notify-intersection-observers-1">notify intersection observers</a> in the <a data-link-type="dfn" href="http://w3c.github.io/requestidlecallback/#dfn-list-of-idle-request-callbacks">list of idle request callbacks</a> with a <var>timeout</var> of 100.</p>
<p class="issue" id="issue-bf9a6e46"><a class="self-link" href="#issue-bf9a6e46"></a> Should we use something other than 100ms as <var>timeout</var>?</p>
<p class="issue" id="issue-f67f2718"><a class="self-link" href="#issue-f67f2718"></a> Should we consider making this just post a task instead?</p>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> to the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/dom.html#the-document-object">document</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop">event loop</a> to <a data-link-type="dfn" href="#notify-intersection-observers" id="ref-for-notify-intersection-observers-1">notify intersection observers</a>.</p>
</ol>
<h4 class="heading settled" data-level="3.2.2" id="notify-intersection-observers-algo"><span class="secno">3.2.2. </span><span class="content"> Notify Intersection Observers</span><a class="self-link" href="#notify-intersection-observers-algo"></a></h4>
<p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="notify-intersection-observers">notify intersection observers</dfn> for a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/dom.html#the-document-object">Document</a> <var>document</var>,
Expand Down Expand Up @@ -1097,11 +1093,6 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
};

</pre>
<h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
<div style="counter-reset:issue">
<div class="issue"> Should we use something other than 100ms as <var>timeout</var>?<a href="#issue-bf9a6e46"></a></div>
<div class="issue"> Should we consider making this just post a task instead?<a href="#issue-f67f2718"></a></div>
</div>
<aside class="dfn-panel" data-for="intersection-observer">
<b><a href="#intersection-observer">#intersection-observer</a></b><b>Referenced in:</b>
<ul>
Expand Down

0 comments on commit 2bad9ae

Please sign in to comment.