Class WaitFor
A managed wrapper of wait-for configurations. It also provides factory methods to set all related configurations as per desire waitfor type.
Inheritance
Namespace: IronPdf.Engines.Chrome
Assembly: IronPdf.dll
Syntax
public class WaitFor : Object
Methods
JavaScript(Int32)
Prepare configurations for wait-for type of IronPdf.Engines.Chrome.WaitForType.ManualTrigger.
This method proceeds rendering by waiting until user calls our JS function
window.ironpdf.notifyRender()
Declaration
public void JavaScript(int maxWaitTime = 10000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxWaitTime | Maximum wait time in milliseconds until it forces rendering. Default value is IronPdf.Engines.Chrome.WaitFor.DefaultMaxWaitTime |
NetworkIdle(Int32, Int32, Int32)
Prepare configurations for wait-for type of IronPdf.Engines.Chrome.WaitForType.NetworkIdleN.
This method proceeds rendering by waiting until it internally detects a network idle event when there is no network activity after at least specified networkIdleDuration as well as at maximum of maxNumAllowedInflight inflight (outstanding) network requests.
Declaration
public void NetworkIdle(int networkIdleDuration, int maxNumAllowedInflight, int maxWaitTime = 10000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | networkIdleDuration | Duration of time in milliseconds to regard as network idle event |
System.Int32 | maxNumAllowedInflight | Maximum number of allowed inflight network requests to not invalidate network idle event |
System.Int32 | maxWaitTime | Maximum wait time in milliseconds until it forces rendering. Default value is IronPdf.Engines.Chrome.WaitFor.DefaultMaxWaitTime |
NetworkIdle0(Int32)
Prepare configurations for wait-for type of IronPdf.Engines.Chrome.WaitForType.NetworkIdle0.
This method proceeds rendering by waiting until it internally detects a network idle event when there is no network activity after at least 500ms as well as no inflight (outstanding) network requests.
Declaration
public void NetworkIdle0(int maxWaitTime = 10000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxWaitTime | Maximum wait time in milliseconds until it forces rendering. Default value is IronPdf.Engines.Chrome.WaitFor.DefaultMaxWaitTime |
NetworkIdle2(Int32)
Prepare configurations for wait-for type of IronPdf.Engines.Chrome.WaitForType.NetworkIdle2.
This method proceeds rendering by waiting until it internally detects a network idle event when there is no network activity after at least 500ms as well as at maximum of 2 inflight (outstanding) network request.
Declaration
public void NetworkIdle2(int maxWaitTime = 10000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxWaitTime | Maximum wait time in milliseconds until it forces rendering. Default value is IronPdf.Engines.Chrome.WaitFor.DefaultMaxWaitTime |
PageLoad()
Prepare configurations for wait-for type of IronPdf.Engines.Chrome.WaitForType.None.
Basically it waits for nothing, but will render as soon as the page loaded.
Declaration
public void PageLoad()
RenderDelay(Int32)
Prepare configurations for wait-for type of IronPdf.Engines.Chrome.WaitForType.RenderDelay.
This method proceeds rendering by introducing an initial delay before rendering.
Declaration
public void RenderDelay(int delay)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | delay | Delay time in milliseconds before rendering |