Fires on the source object before the selection is deleted from the document.
If the event bubbles and is cancellable, return VARIANT_TRUE to prevent the event from bubbling to other event handlers in the document tree. Return VARIANT_FALSE to allow bubbling.
The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
Bubbles Yes Cancels Yes To invoke
- Right-click to display the shortcut menu and select Cut.
- Or press CTRL+X if the selection is within a text field.
Default action None.
Creating custom code for cutting requires several steps:
- Set event.returnValue=false in the HTMLAreaEvents::onbeforecut event to enable the Cut shortcut menu item.
- Specify a data format in which to transfer the selection through the IHTMLDataTransfer::setData method of the clipboardData object.
- Invoke the IHTMLDataTransfer::setData method in the HTMLAreaEvents::oncut event.