Revert "feat(svg): Provide support for SVG foreignObject by adding xhtml namespace"
This reverts commit eb688f2c8e
.
This commit is contained in:
parent
19cfb4eb12
commit
3d96c2337f
|
@ -6,11 +6,8 @@ import {splitNsName} from 'angular2/src/compiler/html_tags';
|
||||||
|
|
||||||
import {ElementSchemaRegistry} from './element_schema_registry';
|
import {ElementSchemaRegistry} from './element_schema_registry';
|
||||||
|
|
||||||
const NAMESPACE_URIS = CONST_EXPR({
|
const NAMESPACE_URIS =
|
||||||
'xlink': 'http://www.w3.org/1999/xlink',
|
CONST_EXPR({'xlink': 'http://www.w3.org/1999/xlink', 'svg': 'http://www.w3.org/2000/svg'});
|
||||||
'svg': 'http://www.w3.org/2000/svg',
|
|
||||||
'xhtml': 'http://www.w3.org/1999/xhtml'
|
|
||||||
});
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
export class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
||||||
|
|
|
@ -28,11 +28,8 @@ import {ViewEncapsulation} from 'angular2/src/core/metadata';
|
||||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||||
import {camelCaseToDashCase} from './util';
|
import {camelCaseToDashCase} from './util';
|
||||||
|
|
||||||
const NAMESPACE_URIS = CONST_EXPR({
|
const NAMESPACE_URIS =
|
||||||
'xlink': 'http://www.w3.org/1999/xlink',
|
CONST_EXPR({'xlink': 'http://www.w3.org/1999/xlink', 'svg': 'http://www.w3.org/2000/svg'});
|
||||||
'svg': 'http://www.w3.org/2000/svg',
|
|
||||||
'xhtml': 'http://www.w3.org/1999/xhtml'
|
|
||||||
});
|
|
||||||
const TEMPLATE_COMMENT_TEXT = 'template bindings={}';
|
const TEMPLATE_COMMENT_TEXT = 'template bindings={}';
|
||||||
var TEMPLATE_BINDINGS_EXP = /^template bindings=(.*)$/g;
|
var TEMPLATE_BINDINGS_EXP = /^template bindings=(.*)$/g;
|
||||||
|
|
||||||
|
|
|
@ -1859,30 +1859,6 @@ function declareTests() {
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should support foreignObjects',
|
|
||||||
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder,
|
|
||||||
async) => {
|
|
||||||
tcb.overrideView(
|
|
||||||
MyComp, new ViewMetadata({
|
|
||||||
template:
|
|
||||||
'<svg><foreignObject><xhtml:div><p>Test</p></xhtml:div></foreignObject></svg>'
|
|
||||||
}))
|
|
||||||
.createAsync(MyComp)
|
|
||||||
.then((fixture) => {
|
|
||||||
var el = fixture.debugElement.nativeElement;
|
|
||||||
var svg = DOM.childNodes(el)[0];
|
|
||||||
var foreignObject = DOM.childNodes(svg)[0];
|
|
||||||
var p = DOM.childNodes(foreignObject)[0];
|
|
||||||
expect(DOM.getProperty(<Element>svg, 'namespaceURI'))
|
|
||||||
.toEqual('http://www.w3.org/2000/svg');
|
|
||||||
expect(DOM.getProperty(<Element>foreignObject, 'namespaceURI'))
|
|
||||||
.toEqual('http://www.w3.org/2000/svg');
|
|
||||||
expect(DOM.getProperty(<Element>p, 'namespaceURI'))
|
|
||||||
.toEqual('http://www.w3.org/1999/xhtml');
|
|
||||||
|
|
||||||
async.done();
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('attributes', () => {
|
describe('attributes', () => {
|
||||||
|
|
Loading…
Reference in New Issue