Sorry and I have changed to use the DOM `contains` method, because `$.contains` do not include that parent & node are same element, which should be included in this issue(when `<script>` is appended directly into `<html>` tag).