pub fn create_iter_result_object(context: &mut Context, value: JsValue, done: bool) -> JsValue {
    // 1. Assert: Type(done) is Boolean.
    // 2. Let obj be ! OrdinaryObjectCreate(%Object.prototype%).
    let obj = context.construct_object();

    // 3. Perform ! CreateDataPropertyOrThrow(obj, "value", value).
    obj.create_data_property_or_throw("value", value, context)
        .unwrap();
    // 4. Perform ! CreateDataPropertyOrThrow(obj, "done", done).
    obj.create_data_property_or_throw("done", done, context)
        .unwrap();
    // 5. Return obj.
    obj.into()
}
/// CreateIterResultObject( value, done )
///
/// Generates an object supporting the IteratorResult interface.
CreateIterResultObject( value, done )
Generates an object supporting the IteratorResult interface.
CreateIterResultObject ( value done ) Generates an object supporting the IteratorResult interface .
pub fn create_iter_result_object(context: &mut Context, value: JsValue, done: bool) -> JsValue {
    // 1. Assert: Type(done) is Boolean.
    // 2. Let obj be ! OrdinaryObjectCreate(%Object.prototype%).
    let obj = context.construct_object();
    // 3. Perform ! CreateDataPropertyOrThrow(obj, "value", value).
    obj.create_data_property_or_throw("value", value, context)
        .unwrap();
    // 4. Perform ! CreateDataPropertyOrThrow(obj, "done", done).
    obj.create_data_property_or_throw("done", done, context)
        .unwrap();
    // 5. Return obj.
    obj.into()
}
pub fn create_iter_result_object ( context : & mut Context , value : JsValue , done : bool ) -> JsValue { // 1. Assert: Type(done) is Boolean. // 2. Let obj be ! OrdinaryObjectCreate(%Object.prototype%). let obj = context . construct_object ( ) ; // 3. Perform ! CreateDataPropertyOrThrow(obj, "value", value). obj . create_data_property_or_throw ( " " , value , context ) . unwrap ( ) ; // 4. Perform ! CreateDataPropertyOrThrow(obj, "done", done). obj . create_data_property_or_throw ( " " , done , context ) . unwrap ( ) ; // 5. Return obj. obj . into ( ) }
CreateIterResultObject( value, done )
Generates an object supporting the IteratorResult interface.
CreateIterResultObject ( value done ) Generates an object supporting the IteratorResult interface .
context
&mut Context
value
JsValue
done
bool
context
&mut Context
value
JsValue
done
bool