replace entered|leftDocumentCallback support: addresses https://github.com/Polymer/platform/issues/41.