https://www.w3.org/Bugs/Public/show_bug.cgi?id=24570

            Bug ID: 24570
           Summary: [Custom]: Callback for cloneNode/importNode
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglaz...@chromium.org
          Reporter: a...@chromium.org
        QA Contact: public-webapps-bugzi...@w3.org
                CC: m...@w3.org, public-webapps@w3.org
            Blocks: 14968

Built in elements like inputs have hooks for cloning data that is not
represented as children or attributes.

Strawman:

Add a cloneNodeCallback, which gets called after the element has been called,
with a the original element as the context object and the new node as the only
argument.

Then HTMLInputElement could be implemented as:

document.registerElemetn('input', {
  prototype: {
    __proto__: HTMLElement.prototype,
    cloneNodeCallback: function(newNode) {
      newNode.value = this.value;
    }
  }
});

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to