From 9f3381a3d92c62d64cbf0296f7c967898a30d63d Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Mon, 17 Apr 2017 16:50:58 -0700 Subject: [PATCH] v1.9.1 --- bower.json | 2 +- build.log | 224 ++++++++++++++++++++++----------------------- polymer-micro.html | 2 +- polymer.html | 55 ++++++++--- 4 files changed, 157 insertions(+), 126 deletions(-) diff --git a/bower.json b/bower.json index c76dba54cb..c49ba078e5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "polymer", - "version": "1.9.0", + "version": "1.9.1", "main": [ "polymer.html", "polymer-mini.html", diff --git a/build.log b/build.log index 034e00d9b3..2ef7f135cc 100644 --- a/build.log +++ b/build.log @@ -1,107 +1,107 @@ BUILD LOG --------- -Build Time: 2017-04-13T17:20:41-0700 +Build Time: 2017-04-17T16:49:58-0700 NODEJS INFORMATION ================== -nodejs: v7.8.0 +nodejs: v7.9.0 accepts: 1.3.3 accessibility-developer-tools: 2.12.0 +abbrev: 1.1.0 acorn: 5.0.3 acorn-jsx: 3.0.1 adm-zip: 0.4.7 after: 0.8.2 agent-base: 2.0.1 -abbrev: 1.1.0 ajv-keywords: 1.5.1 align-text: 0.1.4 amdefine: 1.0.1 -ansi-escapes: 1.4.0 ansi-cyan: 0.1.1 +ansi-escapes: 1.4.0 ansi-red: 0.1.1 ansi-regex: 2.1.1 +append-field: 0.1.0 ansi-styles: 2.2.1 ansi-wrap: 0.1.0 -append-field: 0.1.0 archiver: 0.14.4 +ajv: 4.11.6 archy: 1.0.0 argparse: 1.0.9 -arr-diff: 2.0.0 -ajv: 4.11.6 arr-flatten: 1.0.1 arr-union: 2.1.0 -array-differ: 1.0.0 +arr-diff: 2.0.0 array-flatten: 1.1.1 array-slice: 0.2.3 array-union: 1.0.2 array-uniq: 1.0.3 array-unique: 0.2.1 +array-differ: 1.0.0 arraybuffer.slice: 0.0.6 arrify: 1.0.1 asap: 2.0.5 asn1: 0.1.11 -assert-plus: 0.1.5 assertion-error: 1.0.2 async: 0.9.2 asynckit: 0.4.0 aws-sign2: 0.6.0 aws4: 1.6.0 +babel-code-frame: 6.22.0 babel-polyfill: 6.23.0 -babel-runtime: 6.23.0 backo2: 1.0.2 +babel-runtime: 6.23.0 backoff: 2.5.0 balanced-match: 0.4.2 -babel-code-frame: 6.22.0 base64-js: 1.1.2 base64-arraybuffer: 0.1.5 base64id: 1.0.0 bcrypt-pbkdf: 1.0.1 beeper: 1.1.1 -better-assert: 1.0.2 binaryextensions: 1.0.1 -bl: 1.2.0 +better-assert: 1.0.2 blob: 0.0.4 bluebird: 2.11.0 body-parser: 1.17.1 -boxen: 0.3.1 boom: 2.10.1 -braces: 1.8.5 brace-expansion: 1.1.7 +braces: 1.8.5 +boxen: 0.3.1 buffer-crc32: 0.2.13 buffer-shims: 1.0.0 bufferstreams: 1.1.1 -bunyan: 1.8.10 browserstack: 1.5.0 +bunyan: 1.8.10 +busboy: 0.2.14 bytes: 2.4.0 caller-path: 0.1.0 callsite: 1.0.0 callsites: 0.2.0 -busboy: 0.2.14 camelcase: 1.2.1 -center-align: 0.1.3 +assert-plus: 0.1.5 +bl: 1.2.0 +capture-stack-trace: 1.0.0 caseless: 0.11.0 +center-align: 0.1.3 chai: 3.5.0 chalk: 1.1.3 circular-json: 0.3.1 -cleankill: 1.0.3 cli-cursor: 1.0.2 cli-width: 2.1.0 +cleankill: 1.0.3 clone: 1.0.2 clone-stats: 0.0.1 -capture-stack-trace: 1.0.0 -code-point-at: 1.1.0 cliui: 2.1.0 +code-point-at: 1.1.0 co: 4.6.0 combined-stream: 1.0.5 -component-bind: 1.0.0 commander: 2.3.0 +component-bind: 1.0.0 component-inherit: 0.0.3 -concat-map: 0.0.1 component-emitter: 1.1.2 +concat-map: 0.0.1 concat-stream: 1.6.0 -compress-commons: 0.2.9 configstore: 2.1.0 content-disposition: 0.5.2 +compress-commons: 0.2.9 content-type: 1.0.2 cookie: 0.3.1 cookie-signature: 1.0.6 @@ -109,9 +109,9 @@ core-js: 2.4.1 core-util-is: 1.0.2 crc: 3.2.1 crc32-stream: 0.3.4 +create-error-class: 3.0.2 cryptiles: 2.0.5 csv: 0.4.6 -create-error-class: 3.0.2 csv-generate: 0.0.6 csv-parse: 1.2.0 csv-stringify: 0.0.8 @@ -122,42 +122,42 @@ debug: 2.6.3 debuglog: 1.0.1 decamelize: 1.2.0 deep-eql: 0.1.3 +d: 1.0.0 deep-extend: 0.4.1 deep-is: 0.1.3 defaults: 1.0.3 del: 2.2.2 delayed-stream: 1.0.0 -d: 1.0.0 deprecated: 0.0.1 destroy: 1.0.4 detect-file: 0.1.0 dezalgo: 1.0.3 -diff: 1.4.0 -dicer: 0.2.5 depd: 1.1.0 +dicer: 0.2.5 +diff: 1.4.0 doctrine: 2.0.0 dom5: 1.3.6 domelementtype: 1.3.0 domhandler: 2.3.0 dom-serializer: 0.1.0 domutils: 1.5.1 +dot-prop: 3.0.0 dtrace-provider: 0.6.0 duplexer: 0.1.1 duplexer2: 0.0.2 -dot-prop: 3.0.0 +ecc-jsbn: 0.1.1 ee-first: 1.1.1 encodeurl: 1.0.1 end-of-stream: 0.1.5 engine.io: 1.8.3 -ecc-jsbn: 0.1.1 engine.io-client: 1.8.3 entities: 1.1.1 engine.io-parser: 1.3.2 -es6-iterator: 2.0.1 es5-ext: 0.10.15 -es6-map: 0.1.5 error-ex: 1.3.1 +es6-iterator: 2.0.1 es6-promise: 2.3.0 +es6-map: 0.1.5 es6-symbol: 3.1.1 es6-weak-map: 2.0.2 escape-html: 1.0.3 @@ -166,13 +166,13 @@ escape-string-regexp: 1.0.5 escodegen: 1.8.1 escope: 3.6.0 eslint: 3.19.0 -es6-set: 0.1.5 eslint-plugin-html: 1.7.0 espree: 3.4.1 +es6-set: 0.1.5 esquery: 1.0.0 esrecurse: 4.1.0 -esutils: 2.0.2 estraverse: 4.2.0 +esutils: 2.0.2 etag: 1.8.0 event-emitter: 0.3.5 exit-hook: 1.1.1 @@ -185,30 +185,30 @@ extend-shallow: 1.1.4 express: 4.15.2 extsprintf: 1.2.0 extglob: 0.3.2 -fancy-log: 1.3.0 fast-levenshtein: 2.0.6 +fancy-log: 1.3.0 figures: 1.7.0 file-entry-cache: 2.0.0 filename-regex: 2.0.0 fill-range: 2.2.3 filled-array: 1.1.0 fd-slicer: 1.0.1 -find-index: 0.1.1 finalhandler: 1.0.1 +find-index: 0.1.1 findup-sync: 0.4.3 first-chunk-stream: 1.0.0 -flagged-respawn: 0.3.2 fined: 1.0.2 flat-cache: 1.2.2 for-in: 1.0.2 +flagged-respawn: 0.3.2 for-own: 0.1.5 forever-agent: 0.6.1 form-data: 2.1.4 formatio: 1.1.1 -freeport: 1.0.5 +forwarded: 0.1.0 formidable: 1.1.1 +freeport: 1.0.5 fresh: 0.5.0 -forwarded: 0.1.0 fs-exists-sync: 0.1.0 fs.realpath: 1.0.0 gaze: 0.5.2 @@ -224,37 +224,38 @@ glob-stream: 3.1.18 glob-watcher: 0.0.6 glob2base: 0.0.12 global-modules: 0.2.3 +global-prefix: 0.1.5 globals: 9.17.0 globby: 5.0.0 globule: 0.1.0 glogg: 1.0.0 graceful-fs: 3.0.11 graceful-readlink: 1.0.1 -global-prefix: 0.1.5 growl: 1.9.2 gulp: 3.9.1 gulp-audit: 1.0.0 gulp-eslint: 3.0.1 +got: 5.7.1 gulp-rename: 1.2.2 gulp-replace: 0.5.4 gulp-util: 3.0.8 gulp-vulcanize: 6.1.0 gulplog: 1.0.0 -got: 5.7.1 -har-validator: 2.0.6 handle-thing: 1.2.5 -has-ansi: 2.0.0 +har-validator: 2.0.6 has-binary: 0.1.7 +has-ansi: 2.0.0 has-color: 0.1.7 -has-cors: 1.1.0 has-gulplog: 0.1.0 -homedir-polyfill: 1.0.1 +has-cors: 1.1.0 +hawk: 3.1.3 hoek: 2.16.3 +homedir-polyfill: 1.0.1 hpack.js: 2.1.6 htmlparser2: 3.9.2 http-deceiver: 1.2.7 -hawk: 3.1.3 http-signature: 0.11.0 +http-errors: 1.6.1 https-proxy-agent: 1.0.0 hydrolysis: 1.24.1 iconv-lite: 0.4.15 @@ -262,18 +263,17 @@ ignore: 3.2.7 imurmurhash: 0.1.4 indexof: 0.0.1 inflight: 1.0.6 -http-errors: 1.6.1 -ini: 1.3.4 inherits: 2.0.3 -inquirer: 0.12.0 +ini: 1.3.4 +interpret: 1.0.2 ipaddr.js: 1.3.0 is-absolute: 0.2.6 is-arrayish: 0.2.1 -interpret: 1.0.2 is-buffer: 1.1.5 +inquirer: 0.12.0 is-equal-shallow: 0.1.3 -is-dotfile: 1.0.2 is-extendable: 0.1.1 +is-dotfile: 1.0.2 is-extglob: 1.0.0 is-finite: 1.0.2 is-glob: 2.0.1 @@ -284,8 +284,8 @@ is-obj: 1.0.1 is-path-cwd: 1.0.0 is-path-in-cwd: 1.0.0 is-path-inside: 1.0.0 -is-primitive: 2.0.0 is-posix-bracket: 0.1.1 +is-primitive: 2.0.0 is-property: 1.0.2 is-number: 2.1.0 is-relative: 0.2.1 @@ -295,11 +295,11 @@ is-retry-allowed: 1.1.0 is-stream: 1.1.0 is-typedarray: 1.0.0 is-unc-path: 0.1.2 -is-windows: 0.2.0 is-utf8: 0.2.1 +is-windows: 0.2.0 isarray: 1.0.0 -isobject: 2.1.0 isexe: 2.0.0 +isobject: 2.1.0 isstream: 0.1.2 istextorbinary: 1.0.2 jade: 0.26.3 @@ -312,18 +312,17 @@ json-parse-helpfulerror: 1.0.3 json-schema: 0.2.3 json-stable-stringify: 1.0.1 json-stringify-safe: 5.0.1 -json3: 3.3.2 jsonify: 0.0.0 -jsprim: 1.4.0 jsonpointer: 4.0.1 +json3: 3.3.2 +jsprim: 1.4.0 +keep-alive-agent: 0.0.1 kind-of: 3.1.0 latest-version: 2.0.0 -keep-alive-agent: 0.0.1 launchpad: 0.5.4 lazypipe: 1.0.1 lazystream: 0.1.0 levn: 0.3.0 -lazy-cache: 1.0.4 liftoff: 2.3.0 lodash: 1.0.2 lodash._basecopy: 3.0.1 @@ -333,57 +332,59 @@ lodash._getnative: 3.9.1 lodash._isiterateecall: 3.0.9 lodash._reescape: 3.0.0 lodash._reevaluate: 3.0.0 +lodash._root: 3.0.1 lodash._reinterpolate: 3.0.0 lodash.assignwith: 4.2.0 -lodash._root: 3.0.1 lodash.escape: 3.2.0 lodash.isarguments: 3.1.0 lodash.isarray: 3.0.4 +lazy-cache: 1.0.4 lodash.isempty: 4.4.0 -lodash.isplainobject: 4.0.6 -lodash.keys: 3.1.2 lodash.isstring: 4.0.1 +lodash.keys: 3.1.2 lodash.mapvalues: 4.6.0 lodash.pick: 4.4.0 lodash.restparam: 3.6.1 lodash.template: 3.6.2 lodash.templatesettings: 3.1.1 +lodash.isplainobject: 4.0.6 lolex: 1.3.2 -longest: 1.0.1 lowercase-keys: 1.0.0 lru-cache: 2.7.3 +longest: 1.0.1 media-typer: 0.3.0 -map-cache: 0.2.2 merge-descriptors: 1.0.1 -methods: 1.1.2 +map-cache: 0.2.2 micromatch: 2.3.11 mime: 1.3.4 mime-db: 1.27.0 mime-types: 2.1.15 +methods: 1.1.2 minimalistic-assert: 1.0.0 minimatch: 3.0.3 minimist: 1.2.0 mkdirp: 0.5.1 +mocha: 2.5.3 moment: 2.18.1 ms: 0.7.2 multer: 1.3.0 multipipe: 0.1.2 -mocha: 2.5.3 +mute-stream: 0.0.5 mv: 2.1.1 nan: 2.6.2 natives: 1.1.0 -natural-compare: 1.4.0 ncp: 2.0.0 +natural-compare: 1.4.0 negotiator: 0.6.1 node-int64: 0.3.3 node-status-codes: 1.0.0 node-uuid: 1.4.8 nodegit-promise: 4.0.0 -mute-stream: 0.0.5 nopt: 3.0.6 normalize-package-data: 1.0.3 normalize-path: 2.1.1 number-is-nan: 1.0.1 +nomnom: 1.8.1 oauth-sign: 0.8.2 object-assign: 4.1.1 object-component: 0.0.3 @@ -394,25 +395,25 @@ once: 1.4.0 onetime: 1.1.0 optionator: 0.8.2 orchestrator: 0.3.8 -options: 0.0.6 ordered-read-streams: 0.1.0 os-homedir: 1.0.2 +options: 0.0.6 os-tmpdir: 1.0.2 osenv: 0.1.4 package-json: 2.4.0 parse-filepath: 1.0.1 parse-glob: 3.0.4 -parse-passwd: 1.0.0 parse-json: 2.2.0 +parse-passwd: 1.0.0 parse5: 1.5.1 -parsejson: 0.0.3 parseqs: 0.0.5 parseuri: 0.0.5 +parsejson: 0.0.3 parseurl: 1.3.1 path-is-absolute: 1.0.1 -path-is-inside: 1.0.2 path-parse: 1.0.5 path-posix: 1.0.0 +path-is-inside: 1.0.2 path-root: 0.1.1 path-root-regex: 0.1.2 path-to-regexp: 0.1.7 @@ -420,27 +421,23 @@ pend: 1.2.0 pify: 2.3.0 pinkie: 2.0.4 pinkie-promise: 2.0.1 -plist: 2.0.1 plugin-error: 0.1.2 pluralize: 1.2.1 polyclean: 1.3.1 precond: 0.2.3 prelude-ls: 1.1.2 +plist: 2.0.1 prepend-http: 1.0.4 -nomnom: 1.8.1 -pretty-hrtime: 1.0.3 -process-nextick-args: 1.0.7 -progress: 1.1.8 preserve: 0.2.0 +process-nextick-args: 1.0.7 +pretty-hrtime: 1.0.3 +promisify-node: 0.4.0 proxy-addr: 1.1.4 pseudomap: 1.0.2 -promisify-node: 0.4.0 -punycode: 1.4.1 q: 1.5.0 qs: 6.4.0 randomatic: 1.1.6 range-parser: 1.2.0 -raw-body: 2.2.0 rc: 1.2.1 read-all-stream: 3.1.0 read-installed: 3.1.5 @@ -448,6 +445,7 @@ read-package-json: 1.3.3 readable-stream: 2.2.9 readdir-scoped-modules: 1.0.2 readline2: 1.0.1 +rechoir: 0.6.2 regenerator-runtime: 0.10.3 regex-cache: 0.4.3 registry-auth-token: 3.1.2 @@ -457,14 +455,16 @@ repeat-element: 1.1.2 repeat-string: 1.6.1 repeating: 2.0.1 replace-ext: 0.0.1 +raw-body: 2.2.0 +progress: 1.1.8 replacestream: 4.0.2 request: 2.79.0 require-uncached: 1.0.3 resolve: 1.3.2 resolve-dir: 0.1.1 resolve-from: 1.0.1 +punycode: 1.4.1 restify: 4.3.0 -rechoir: 0.6.2 restore-cursor: 1.0.1 right-align: 0.1.3 rimraf: 2.6.1 @@ -474,39 +474,39 @@ safe-json-stringify: 1.0.4 samsam: 1.1.2 sauce-connect-launcher: 1.2.1 select-hose: 2.0.0 -rx-lite: 3.1.2 selenium-standalone: 5.11.2 +rx-lite: 3.1.2 +semver-diff: 2.1.0 semver: 4.3.6 send: 0.11.1 sequencify: 0.0.7 -semver-diff: 2.1.0 -serve-waterfall: 1.1.1 serve-static: 1.12.1 +serve-waterfall: 1.1.1 server-destroy: 1.0.1 setprototypeof: 1.0.3 shelljs: 0.7.7 sigmund: 1.0.1 sinon: 1.17.7 -sinon-chai: 2.9.0 slice-ansi: 0.0.4 slide: 1.1.6 -sntp: 1.0.9 +sinon-chai: 2.9.0 socket.io: 1.7.3 +sntp: 1.0.9 socket.io-client: 1.7.3 -socket.io-adapter: 0.5.0 socket.io-parser: 2.3.1 -sparkles: 1.0.0 +socket.io-adapter: 0.5.0 source-map: 0.2.0 +sparkles: 1.0.0 spdy: 3.4.4 spdy-transport: 2.0.18 sshpk: 1.13.0 stacky: 1.3.1 -statuses: 1.3.1 stream-combiner: 0.2.2 -sprintf-js: 1.0.3 stream-consume: 0.1.0 +sprintf-js: 1.0.3 stream-transform: 0.1.2 streamsearch: 0.1.2 +statuses: 1.3.1 string-width: 1.0.2 string_decoder: 1.0.0 stringstream: 0.0.5 @@ -514,37 +514,37 @@ strip-ansi: 3.0.1 strip-bom: 1.0.0 strip-json-comments: 2.0.1 supports-color: 2.0.0 -table: 3.8.3 tar-stream: 1.5.2 +table: 3.8.3 test-fixture: 3.0.0-rc.1 -textextensions: 1.0.2 text-table: 0.2.0 +textextensions: 1.0.2 through: 2.3.8 through2: 2.0.3 temp: 0.8.3 -tildify: 1.2.0 time-stamp: 1.0.1 timed-out: 3.1.3 to-array: 0.1.4 to-iso-string: 0.0.2 tough-cookie: 2.3.2 tryit: 1.0.3 -tunnel-agent: 0.4.3 -type-check: 0.3.2 +tildify: 1.2.0 tweetnacl: 0.14.5 +type-check: 0.3.2 type-detect: 1.0.0 type-is: 1.6.15 typedarray: 0.0.6 uglify-js: 2.8.22 uglify-to-browserify: 1.0.2 +tunnel-agent: 0.4.3 ultron: 1.0.2 unc-path-regex: 0.1.2 underscore: 1.6.0 -underscore.string: 3.0.3 unique-stream: 1.0.0 unpipe: 1.0.0 unzip-response: 1.0.2 update-notifier: 0.6.3 +underscore.string: 3.0.3 urijs: 1.16.1 url-parse-lax: 1.0.0 util: 0.10.3 @@ -556,53 +556,53 @@ v8flags: 2.0.12 vargs: 0.1.0 vary: 1.1.1 vasync: 1.6.3 -verror: 1.9.0 +user-home: 1.1.1 vinyl: 0.5.3 +verror: 1.9.0 vinyl-fs: 0.3.14 vulcanize: 1.15.4 wbuf: 1.7.2 wct-sauce: 1.8.6 -wct-local: 2.0.14 wd: 0.3.12 web-component-tester: 4.3.6 which: 1.2.14 -window-size: 0.1.0 widest-line: 1.0.0 +window-size: 0.1.0 wordwrap: 1.0.0 wrappy: 1.0.2 write: 0.2.1 -ws: 1.1.2 write-file-atomic: 1.3.1 +ws: 1.1.2 wtf-8: 1.0.0 xdg-basedir: 2.0.0 -user-home: 1.1.1 -xmlhttprequest-ssl: 1.5.3 +wct-local: 2.0.14 +xmlbuilder: 8.2.2 xmldom: 0.1.27 +xmlhttprequest-ssl: 1.5.3 xtend: 4.0.1 -xmlbuilder: 8.2.2 -yallist: 2.1.2 -yauzl: 2.7.0 yargs: 3.10.0 +yauzl: 2.7.0 yeast: 0.1.2 +yallist: 2.1.2 +zip-stream: 0.5.2 @types/clone: 0.1.30 @types/chalk: 0.4.31 -@types/freeport: 1.0.21 -@types/express-serve-static-core: 4.0.44 @types/express: 4.0.35 +@types/freeport: 1.0.21 @types/mime: 0.0.29 +@types/launchpad: 0.0.4 @types/node: 4.2.4 -@types/serve-static: 1.7.31 +@types/express-serve-static-core: 4.0.44 @types/parse5: 0.0.31 +@types/serve-static: 1.7.31 @types/which: 1.0.28 -@types/launchpad: 0.0.4 -zip-stream: 0.5.2 REPO REVISIONS ============== -polymer-1.x: ab0921128591fb2edc47b85e675f211097ffc965 +polymer-1.x: 6ccc8e0c167aaf62a0685745298a69a7b4a020c0 BUILD HASHES ============ polymer-mini.html: b72f7b995f6537466f79d3ebe3c41bcee64d6149 -polymer-micro.html: cf0a17b4227aa3adaac11908fd0b5f17b2224d00 -polymer.html: f805ed7788c6e29310b69ff1485547a5f2e741b4 \ No newline at end of file +polymer-micro.html: dcfe618647b4556de6fe157e6108e82cc93bbbdd +polymer.html: 41ec26002f37880b8749651e3650272d02412529 \ No newline at end of file diff --git a/polymer-micro.html b/polymer-micro.html index 504e640341..564d1a868d 100644 --- a/polymer-micro.html +++ b/polymer-micro.html @@ -790,7 +790,7 @@ return value != null ? value : undefined; } } -});Polymer.version = "1.9.0";Polymer.Base._addFeature({ +});Polymer.version = "1.9.1";Polymer.Base._addFeature({ _registerFeatures: function () { this._prepIs(); this._prepBehaviors(); diff --git a/polymer.html b/polymer.html index 731b2dce0e..9a32587461 100644 --- a/polymer.html +++ b/polymer.html @@ -2382,7 +2382,7 @@ }); }());Polymer.Base._addFeature({ resolveUrl: function (url) { -return Polymer.ResolveUrl.resolveUrl(url, this.importPath); +return Polymer.ResolveUrl.resolveUrl(url, this._importPath); } });Polymer.CssParse = function () { return { @@ -4707,9 +4707,17 @@ attached: function () { if (this.__isDetached) { this.__isDetached = false; -var parent = Polymer.dom(Polymer.dom(this).parentNode); +var refNode; +var parentNode = Polymer.dom(this).parentNode; +if (parentNode.localName == this.is) { +refNode = parentNode; +parentNode = Polymer.dom(parentNode).parentNode; +} else { +refNode = this; +} +var parent = Polymer.dom(parentNode); for (var i = 0; i < this._instances.length; i++) { -this._attachInstance(i, parent); +this._attachInstance(i, parent, refNode); } } }, @@ -4993,10 +5001,10 @@ return inst; } }, -_attachInstance: function (idx, parent) { +_attachInstance: function (idx, parent, refNode) { var inst = this._instances[idx]; if (!inst.isPlaceholder) { -parent.insertBefore(inst.root, this); +parent.insertBefore(inst.root, refNode); } }, _detachAndRemoveInstance: function (idx) { @@ -5029,6 +5037,12 @@ var beforeRow = this._instances[idx + 1]; var beforeNode = beforeRow && !beforeRow.isPlaceholder ? beforeRow._children[0] : this; var parentNode = Polymer.dom(this).parentNode; +if (parentNode.localName == this.is) { +if (beforeNode == this) { +beforeNode = parentNode; +} +parentNode = Polymer.dom(parentNode).parentNode; +} Polymer.dom(parentNode).insertBefore(inst.root, beforeNode); this._instances[idx] = inst; return inst; @@ -5224,7 +5238,11 @@ this._debounceTemplate(this._render); }, detached: function () { -if (!this.parentNode || this.parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (!Polymer.Settings.hasShadow || !(this.parentNode instanceof ShadowRoot))) { +var parentNode = this.parentNode; +if (parentNode && parentNode.localName == this.is) { +parentNode = Polymer.dom(parentNode).parentNode; +} +if (!parentNode || parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (!Polymer.Settings.hasShadow || !(parentNode instanceof ShadowRoot))) { this._teardownInstance(); } }, @@ -5257,20 +5275,26 @@ } }, _ensureInstance: function () { +var refNode; var parentNode = Polymer.dom(this).parentNode; +if (parentNode && parentNode.localName == this.is) { +refNode = parentNode; +parentNode = Polymer.dom(parentNode).parentNode; +} else { +refNode = this; +} if (parentNode) { -var parent = Polymer.dom(parentNode); if (!this._instance) { this._instance = this.stamp(); var root = this._instance.root; -parent.insertBefore(root, this); +Polymer.dom(parentNode).insertBefore(root, refNode); } else { var c$ = this._instance._children; if (c$ && c$.length) { -var lastChild = Polymer.dom(this).previousSibling; +var lastChild = Polymer.dom(refNode).previousSibling; if (lastChild !== c$[c$.length - 1]) { for (var i = 0, n; i < c$.length && (n = c$[i]); i++) { -parent.insertBefore(n, this); +Polymer.dom(parentNode).insertBefore(n, refNode); } } } @@ -5335,8 +5359,15 @@ this._prepConstructor(); }, _insertChildren: function () { -var parentDom = Polymer.dom(Polymer.dom(this).parentNode); -parentDom.insertBefore(this.root, this); +var refNode; +var parentNode = Polymer.dom(this).parentNode; +if (parentNode.localName == this.is) { +refNode = parentNode; +parentNode = Polymer.dom(parentNode).parentNode; +} else { +refNode = this; +} +Polymer.dom(parentNode).insertBefore(this.root, refNode); }, _removeChildren: function () { if (this._children) {