사용자 정의 요소로 가져온 요소의 모든 특성을 콘솔에 인쇄하는 방법은 무엇입니까?Polymer 1.x : Polymer 요소의 모든 속성을 인쇄하는 방법은 무엇입니까?
예를 들어, 사용자 정의 요소 my-el
이 있고 해당 요소에 firebase-document
요소를 가져 왔습니다. 특정 시점에서 firebase-document
의 모든 속성 값을 관찰하여 firebase-document
요소에 대한 모델의 현재 상태를 알고 싶습니다.
<firebase-document id="document"
app-name="my-app"
data="{{data}}">
</firebase-document>
...
foo: function() {
...
var doc = this.$.document;
// Neither of the following "works" (see below for definition)
console.log('doc', doc);
console.log('doc.properties', doc.properties);
}
의 작품, 나는 그것이 콘솔에 객체를 인쇄 원하는 동작을 생성하지 않는 것을 의미한다. 객체는 doc
객체 인 all the properties입니다. 댓글에서
'console.dir (doc)'을 시도 했습니까? – Supersharp
@Supersharp : 그건 작동합니다. 감사. – Mowzer