兼容 firefox;
change default pattern to "document"