Object.seal(document)=> TypeError:无法阻止此代理对象上的扩展(javascript)

时间:2017-08-01 23:38:48

标签: javascript object

如果我尝试<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/parent_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:clickable="true" android:focusable="true" android:foreground="?attr/selectableItemBackground" android:paddingLeft="16dp" android:paddingRight="16dp" android:transitionName="parent_view" tools:ignore="UnusedAttribute"> <ImageView android:id="@+id/image_layanan" android:layout_width="40dp" android:layout_height="40dp" android:layout_marginTop="16dp" android:transitionName="image_layanan"/> <TextView android:id="@+id/text_layanan" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:layout_marginTop="10dp" android:layout_toEndOf="@id/image_layanan" android:layout_toRightOf="@+id/image_layanan" android:textAppearance="?attr/textAppearanceListItem" android:textSize="16sp" android:transitionName="text_layanan" tools:text="string/item_title"/> <TextView android:id="@+id/text_dokter" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/text_layanan" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:layout_toEndOf="@+id/image_layanan" android:layout_toRightOf="@+id/image_layanan" android:ellipsize="end" android:maxLines="1" android:textAppearance="?attr/textAppearanceListItem" android:textColor="#212121" android:textSize="14sp" android:transitionName="text_dokter" tools:text="string/item_desc"/> <TextView android:id="@+id/text_jam" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/text_dokter" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:layout_toEndOf="@id/image_layanan" android:layout_toRightOf="@id/image_layanan" android:textSize="13sp" android:transitionName="text_jam"/> <TextView android:id="@+id/text_pasien" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/text_jam" android:layout_marginBottom="14dp" android:layout_marginLeft="16dp" android:layout_marginStart="16dp" android:layout_toEndOf="@id/image_layanan" android:layout_toRightOf="@id/image_layanan" android:textSize="13sp" android:transitionName="text_pasien"/> <View android:layout_width="match_parent" android:layout_height="1px" android:layout_alignLeft="@+id/text_pasien" android:layout_alignStart="@+id/text_pasien" android:layout_below="@+id/text_pasien" android:background="#212121"/> </RelativeLayout> ,我会收到错误消息:

  

TypeError:无法阻止此代理对象上的扩展

我会使用禁止添加或删除文档对象的属性来保护源代码到用户操作。

不能那样做?为什么/怎么样?

0 个答案:

没有答案