//! Shared JS-evaluation surface across types that own a CDP session/contextId.
use DeserializeOwned;
use crateResult;
/// Types that can evaluate JavaScript in their context.
///
/// Implemented by [`crate::Tab`] (main frame) and [`crate::Frame`]
/// (per-frame contextId). [`crate::Element`] evaluation has a different
/// shape (binds `el` parameter) and has its own
/// [`crate::Element::evaluate`] / [`crate::Element::evaluate_main`]
/// inherent methods — Element does NOT implement this trait.
///
/// # Examples
///
/// ```no_run
/// use zendriver::Evaluable;
/// async fn get_title<E: Evaluable + Sync>(e: &E) -> zendriver::Result<String> {
/// e.evaluate_main("document.title").await
/// }
/// ```