blob: 947c3c5d1b08b209bb4aa9389baa878b226c49a7 [file] [log] [blame]
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// https://www.w3.org/TR/html5/webappapis.html#windowtimers
[NoInterfaceObject]
interface WindowTimers {
// TODO: Change the following methods back to their original form in the spec,
// when "Function" and "any" are supported.
// https://www.w3.org/TR/html5/webappapis.html#timers
long setTimeout(TimerCallback handler, optional long timeout);
void clearTimeout(long handle);
long setInterval(TimerCallback handler, optional long timeout);
void clearInterval(long handle);
// TODO: If we ever decide to support setTimeout and setInterval
// with a DOMString argument, we must implement the logic described in the CSP
// spec regarding "unsafe-eval".
};
Window implements WindowTimers;
callback TimerCallback = void();