MCPcopy Index your code
hub / github.com/csev/py4e / insertText

Method insertText

code3/bs4/builder/_html5lib.py:226–231  ·  view source on GitHub ↗
(self, data, insertBefore=None)

Source from the content-addressed store, hash-verified

224 attributes = property(getAttributes, setAttributes)
225
226 def insertText(self, data, insertBefore=None):
227 if insertBefore:
228 text = TextNode(self.soup.new_string(data), self.soup)
229 self.insertBefore(data, insertBefore)
230 else:
231 self.appendChild(data)
232
233 def insertBefore(self, node, refNode):
234 index = self.element.index(refNode.element)

Callers

nothing calls this directly

Calls 4

insertBeforeMethod · 0.95
appendChildMethod · 0.95
TextNodeClass · 0.70
new_stringMethod · 0.45

Tested by

no test coverage detected