Java Code Examples for org.w3c.dom.events.MutationEvent#initMutationEvent()

The following examples show how to use org.w3c.dom.events.MutationEvent#initMutationEvent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DocumentImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 2
Source File: DocumentImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 3
Source File: DocumentImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 4
Source File: DocumentImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 5
Source File: DocumentImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 6
Source File: DocumentImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 7
Source File: DocumentImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 8
Source File: DocumentImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 9
Source File: DocumentImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 10
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example 11
Source File: DocumentImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}