blob: 0bb8eb4a0dd99a788f50b1e20f388dc3d59f476a [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Attribute getters must behave differently based on whether [LenientThis] has
// been specified or whether the attribute's type is Promise<T>.
// All attributes below are marked readonly because we are only interested in
// the behavior of attribute getters.
interface TestAttributeGetters {
// [LenientThis] causes some V8 type checks to be bypassed; they are done
// on the Blink side instead and access exceptions just return undefined.
[LenientThis] readonly attribute long lenientThisLongAttribute;
// Promise types must turn exceptions into promise rejections.
readonly attribute Promise<DOMString> stringPromiseAttribute;
// Mixing both should cause [LenientThis] to return without raising an
// exception if type checking fails.
[LenientThis] readonly attribute Promise<DOMString> lenientThisStringPromiseAttribute;
// [RaisesException] also creates an ExceptionState instance. Make sure it
// is not declared twice.
[RaisesException] readonly attribute Promise<short> raisesExceptionShortPromiseAttribute;
// Regular attribute with no special rules.
readonly attribute float floatAttribute;