Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
document.register -> document.registerElement
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jan 6, 2014
1 parent fa5e42a commit ccf29d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions test/html/smoke.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
p.createdCallback = function() {
this.textContent = 'custom!';
}
document.register('x-foo', {prototype: p});
document.registerElement('x-foo', {prototype: p});
//
var p = Object.create(HTMLButtonElement.prototype);
p.createdCallback = function() {
this.textContent = 'custom!';
}
document.register('x-baz', {prototype: p, extends: 'button'});
document.registerElement('x-baz', {prototype: p, extends: 'button'});
document.body.appendChild(document.createElement('button', 'x-baz')).id = 'baz2';
//
assert.equal(document.querySelector('x-foo').textContent, 'custom!',
Expand All @@ -40,11 +40,11 @@
'button is=x-baz can be created via document.createElement(button, x-baz)');
//
var p = Object.create(HTMLElement.prototype);
p.enteredViewCallback = function() {
p.attachedCallback = function() {
this.textContent = 'custom!';
}
//
document.register('x-zot', {prototype: p});
document.registerElement('x-zot', {prototype: p});
//
var xfoo = document.querySelector('x-foo');
var root = xfoo.createShadowRoot();
Expand Down
12 changes: 5 additions & 7 deletions test/html/styling/polyfill-directive.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,18 @@

<template id="x-foo">
<style>
@host {
* {
display: block;
border: 1px solid black;
}
:host {
display: block;
border: 1px solid black;
}

/*@polyfill :host > div */
::-webkit-distributed(*) {
::content > * {
background: green;
}

/*@polyfill :host > div */
::-webkit-distributed(*) {
::content > * {
color: red;
}

Expand Down
2 changes: 1 addition & 1 deletion test/html/styling/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if (typeExtension) {
config.extends = extnds;
}
var ctor = document.register(name, config);
var ctor = document.registerElement(name, config);
return ctor;
}

Expand Down

0 comments on commit ccf29d7

Please sign in to comment.