aboutsummaryrefslogtreecommitdiff
path: root/node_modules/jsdom/lib/jsdom/living/processing-instruction.js
blob: ce9c4b7399adb608cbdacdbf2447b5ab30e109a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"use strict";
var inheritFrom = require("../utils").inheritFrom;

module.exports = function (core) {
  core.ProcessingInstruction = function ProcessingInstruction(ownerDocument, target, data) {
    core.CharacterData.call(this, ownerDocument, data);

    this._target = target;
  };

  inheritFrom(core.CharacterData, core.ProcessingInstruction, {
    nodeType: core.Node.PROCESSING_INSTRUCTION_NODE, // TODO should be on prototype, not here
    get target() { return this._target; }
  });
};