|
@@ -270,6 +270,61 @@ exports.module = function(phantomas) {
|
|
|
phantomas.spy(Node.prototype, 'insertBefore', insertBeforeSpyBefore, function(result) {
|
|
|
phantomas.leaveContext();
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ phantomas.spy(Document.prototype, 'createElement', function(tagName) {
|
|
|
+
|
|
|
+ phantomas.enterContext({
|
|
|
+ type: 'createElement',
|
|
|
+ callDetails: {
|
|
|
+ context: {
|
|
|
+ domElement: '#document'
|
|
|
+ },
|
|
|
+ arguments: [tagName]
|
|
|
+ },
|
|
|
+ backtrace: phantomas.getBacktrace()
|
|
|
+ });
|
|
|
+
|
|
|
+ }, function(result, args) {
|
|
|
+ phantomas.leaveContext();
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ phantomas.spy(Document.prototype, 'createTextNode', function(text) {
|
|
|
+
|
|
|
+ phantomas.enterContext({
|
|
|
+ type: 'createTextNode',
|
|
|
+ callDetails: {
|
|
|
+ context: {
|
|
|
+ domElement: '#document'
|
|
|
+ },
|
|
|
+ arguments: [text]
|
|
|
+ },
|
|
|
+ backtrace: phantomas.getBacktrace()
|
|
|
+ });
|
|
|
+
|
|
|
+ }, function(result, args) {
|
|
|
+ phantomas.leaveContext();
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ phantomas.spy(Document.prototype, 'createDocumentFragment', function() {
|
|
|
+
|
|
|
+ phantomas.enterContext({
|
|
|
+ type: 'createDocumentFragment',
|
|
|
+ callDetails: {
|
|
|
+ context: {
|
|
|
+ domElement: '#document'
|
|
|
+ },
|
|
|
+ arguments: []
|
|
|
+ },
|
|
|
+ backtrace: phantomas.getBacktrace()
|
|
|
+ });
|
|
|
+
|
|
|
+ }, function(result, args) {
|
|
|
+ phantomas.leaveContext();
|
|
|
+ });
|
|
|
+
|
|
|
})(window.__phantomas);
|
|
|
});
|
|
|
});
|