Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Type extension doesn't work for SVG elements #24

@jails

Description

@jails

Hi, for an unknown reason the following spec (which passes on Chrome) doesn't pass with the polyfill.

it("creates a custom SVG element", function() {

    var MegaCircle = document.registerElement('mega-circle', {
      prototype: Object.create(SVGCircleElement.prototype),
      extends: 'circle'
    });

    var element = document.createElementNS("http://www.w3.org/2000/svg",  "circle",  "mega-circle");
    expect(element instanceof MegaCircle).toBe(true);

  });

Using the polyfill, element still an instance of SVGCircleElement instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions