Skip to main content

script_bindings/
assert.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5use style::thread_state;
6
7pub fn assert_in_layout() {
8    debug_assert!(thread_state::get().is_layout());
9}
10
11pub fn assert_in_script() {
12    debug_assert!(thread_state::get().is_script());
13}