Node: phương thức lookupPrefix()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Phương thức lookupPrefix() của giao diện Node trả về một chuỗi chứa tiền tố của một URI namespace đã cho, nếu có, và null nếu không. Khi có nhiều tiền tố khả dĩ, kết quả phụ thuộc vào cách triển khai.

Cú pháp

js
lookupPrefix(namespaceURI)

Tham số

namespaceURI

URI namespace cần tra cứu.

Giá trị trả về

Tiền tố tương ứng hoặc null.

Thông số kỹ thuật

Thông số kỹ thuật
DOM
# dom-node-lookupprefix

Tương thích trình duyệt